diff options
author | Junghyun Kim <jh1114.kim@samsung.com> | 2012-08-21 20:36:59 +0900 |
---|---|---|
committer | Junghyun Kim <jh1114.kim@samsung.com> | 2012-08-21 20:36:59 +0900 |
commit | f866d8d895d7dc3b3081cf80114dbfcb3a10ccfc (patch) | |
tree | d87aeca630651e5c1fa5b510a19087b5edd8303a /src | |
parent | 62b4c1ecb06f2533cc304af74052a6a80f5e60d5 (diff) | |
download | taskmanager-f866d8d895d7dc3b3081cf80114dbfcb3a10ccfc.tar.gz taskmanager-f866d8d895d7dc3b3081cf80114dbfcb3a10ccfc.tar.bz2 taskmanager-f866d8d895d7dc3b3081cf80114dbfcb3a10ccfc.zip |
Update changed code
Diffstat (limited to 'src')
-rw-r--r-- | src/_cpu.c | 32 | ||||
-rw-r--r-- | src/_cpu.h | 32 | ||||
-rw-r--r-- | src/_eina.c | 35 | ||||
-rw-r--r-- | src/_eina.h | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | src/_genlist.c | 99 | ||||
-rw-r--r-- | src/_genlist.h | 32 | ||||
-rw-r--r-- | src/_info.c | 32 | ||||
-rw-r--r-- | src/_info.h | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | src/_logic.c | 56 | ||||
-rw-r--r-- | src/_logic.h | 32 | ||||
-rw-r--r-- | src/_progressbar.c | 32 | ||||
-rw-r--r-- | src/_progressbar.h | 32 | ||||
-rw-r--r-- | src/_util_efl.c | 38 | ||||
-rw-r--r-- | src/_util_efl.h | 32 | ||||
-rw-r--r-- | src/_util_log.h | 32 | ||||
-rwxr-xr-x[-rw-r--r--] | src/taskmanager.c | 48 | ||||
-rwxr-xr-x[-rw-r--r--] | src/taskmanager.h | 37 |
17 files changed, 351 insertions, 314 deletions
@@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include <unistd.h> @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_CPU_H__ diff --git a/src/_eina.c b/src/_eina.c index 6a0ed22..eeb0e07 100644 --- a/src/_eina.c +++ b/src/_eina.c @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include <stdlib.h> @@ -166,6 +168,8 @@ int taskmanager_get_history_app_info(void *data) || strlen(rec_result.pkg_name) < 1) { continue; } + + _D("%s\n", rec_result.pkg_name); ret = ail_package_get_appinfo(rec_result.pkg_name, &handle); if (ret != AIL_ERROR_OK) { _D("Failed to get appinfo(%d)\n", ret); @@ -207,6 +211,7 @@ int taskmanager_get_history_app_info(void *data) } snprintf(buf, sizeof(buf), "%s", valc); info->icn_path = strdup(buf); + _D("%s\n", info->icn_path); info->ad = ad; info->pid = 0; diff --git a/src/_eina.h b/src/_eina.h index 1a57c21..8d8ef06 100644 --- a/src/_eina.h +++ b/src/_eina.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_EINA_H__ diff --git a/src/_genlist.c b/src/_genlist.c index 75e7246..88a8341 100644..100755 --- a/src/_genlist.c +++ b/src/_genlist.c @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include <stdio.h> @@ -54,8 +56,8 @@ static Elm_Genlist_Item_Class itc_separator4; static Elm_Genlist_Item_Class itc_separator2; static char *button_text[TS_MAX] = { - "IDS_COM_SK3_END_ALL_APPLICATIONS", - "IDS_TASKMGR_DELETE_ALL_HISTORY" + "IDS_TASKMGR_BUTTON_CLOSE_ALL_APPLICATIONS", + "IDS_TASKMGR_BUTTON_CLEAR_HISTORY_ABB" }; static void end_all_inuse_cb(void *data, Evas_Object *obj, void *event_info); @@ -64,24 +66,19 @@ static void delete_all_history_cb(void *data, Evas_Object *obj, void (*func_del[TS_MAX]) (void *data, Evas_Object *obj, void *event_info) = { &end_all_inuse_cb, &delete_all_history_cb}; -static char *icon_text[TS_MAX] = { - "IDS_COM_BODY_END", - "IDS_COM_OPT_DELETE" -}; - static void end_inuse_cb(void *data, Evas_Object *obj, void *event_info); static void delete_history_cb(void *data, Evas_Object *obj, void *event_info); void (*func_end[TS_MAX]) (void *data, Evas_Object *obj, void *event_info) = { &end_inuse_cb, &delete_history_cb}; static char *group_name[TS_MAX] = { - "IDS_ST_BODY_IN_USE", - "IDS_MUSIC_OPT_HISTORY" + "IDS_TASKMGR_HEADER_RUNNING", + "IDS_TASKMGR_MBODY_RECENTLY_USED" }; static char *nolist_text[TS_MAX] = { - "IDS_TASKMGR_NO_RUNNING_TASK", - "IDS_TASKMGR_NO_TASK_HISTORY" + "IDS_TASKMGR_MBODY_NO_APPS_OPEN", + "IDS_TASKMGR_MBODY_NO_RECENTLY_USED_APPS" }; void taskmanager_free_info(struct _task_info *info); @@ -146,7 +143,7 @@ static void end_all_inuse_cb(void *data, Evas_Object *obj, void *event_info) char buf[_BUF_MAX] = { 0, }; ad->mode = MODE_END_ALL_INUSE; - snprintf(buf, sizeof(buf), _("IDS_TASKMGR_WARNNING_TERMINATE_ALL_TASKS")); + snprintf(buf, sizeof(buf), T_("IDS_TASKMGR_POP_CLOSE_ALL_APPS_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST")); if (ad->popup_ask) { evas_object_del(ad->popup_ask); ad->popup_ask = NULL; @@ -166,7 +163,7 @@ _D("func\n"); // refresh_app_info(ad); ad->mode = MODE_DEL_ALL_HISTORY; - snprintf(buf, sizeof(buf), _("IDS_TASKMGR_ASK_DELETE_ALL_HISTORY")); + snprintf(buf, sizeof(buf), T_("IDS_TASKMGR_POP_CLEAR_ALL_APP_HISTORY_Q")); if (ad->popup_ask) { evas_object_del(ad->popup_ask); ad->popup_ask = NULL; @@ -183,7 +180,7 @@ static void end_inuse_cb(void *data, Evas_Object *obj, void *event_info) char buf[_BUF_MAX] = { 0, }; ad->mode = MODE_END_INUSE; - snprintf(buf, _BUF_MAX, _("IDS_TASKMGR_ASK_TERMINATE_TASK"), info_ev->app_name); + snprintf(buf, _BUF_MAX, T_("IDS_TASKMGR_POP_CLOSE_PS_APP_Q_THIS_MAY_CAUSE_DATA_TO_BE_LOST"), info_ev->app_name); if (ad->popup_ask) { evas_object_del(ad->popup_ask); ad->popup_ask = NULL; @@ -203,7 +200,7 @@ static void delete_history_cb(void *data, Evas_Object *obj, void *event_info) ad->mode = MODE_DEL_HISTORY; - snprintf(buf, _BUF_MAX, _("IDS_TASKMGR_ASK_CLEAR_HISTORY"), info_ev->app_name); + snprintf(buf, _BUF_MAX, T_("IDS_TASKMGR_POP_CLEAR_PS_HISTORY_Q"), info_ev->app_name); if (ad->popup_ask) { evas_object_del(ad->popup_ask); ad->popup_ask = NULL; @@ -226,7 +223,7 @@ static char *nl_text_get(void *data, Evas_Object *obj, const char *part) char buf[_BUF_MAX] = { 0, }; if (!strcmp(part, "elm.text")) { - snprintf(buf, sizeof(buf), "%s", _(nolist_text[(int)data])); + snprintf(buf, sizeof(buf), "%s", T_(nolist_text[(int)data])); return strdup(buf); } @@ -241,6 +238,9 @@ _D("func\n"); struct _task_info *info; /* parameter to block double click */ static int selected = 0; + Elm_Object_Item *it = (Elm_Object_Item *) event_info; + + elm_genlist_item_selected_set(it, EINA_FALSE); retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); @@ -270,14 +270,13 @@ _D("func\n"); if (info->pid) { /* when application is alive */ aul_resume_pid(info->pid); - elm_exit(); - + selected = 0; } else { /* when application is dead */ if (info->pkg_name == NULL) { util_show_popup_with_message(info->ad->win, 3.0, - _("IDS_TASKMGR_CANNOT_LAUNCH_APPLICATION")); + T_("IDS_TASKMGR_POP_UNABLE_TO_OPEN_APPLICATION")); selected = 0; } else { @@ -288,10 +287,10 @@ _D("func\n"); * since being unifyed dialer, voice call and video call */ aul_launch_app(info->pkg_name, NULL); - + selected = 0; } else { aul_launch_app(info->pkg_name, info->b); - + selected = 0; } } } @@ -345,7 +344,7 @@ static Evas_Object *_gl_content_get_app(void *data, Evas_Object *obj, } else if (!strcmp(part, "elm.icon.2")) { btn = elm_button_add(obj); - elm_object_text_set(btn, _("IDS_COM_BODY_END")); + elm_object_text_set(btn, S_("IDS_COM_BODY_END")); elm_object_style_set(btn, "default"); evas_object_smart_callback_add(btn, "clicked", @@ -406,7 +405,7 @@ _D("func\n"); static char *_bl_text_get(void *data, Evas_Object *obj, const char *part) { if (!strcmp(part, "elm.text")) { - return strdup(_(button_text[(int)data])); + return strdup(T_(button_text[(int)data])); } return NULL; @@ -423,7 +422,7 @@ static Evas_Object *_bl_content_get(void *data, Evas_Object *obj, btn = elm_button_add(obj); elm_object_style_set(btn, "default"); - elm_object_text_set(btn, _(button_text[(int)data])); + elm_object_text_set(btn, T_(button_text[(int)data])); evas_object_smart_callback_add(btn, "clicked", func_del[(int)data], ad); elm_object_focus_set(btn, EINA_FALSE); @@ -446,8 +445,8 @@ static char *_gl_text_get_title(void *data, Evas_Object *obj, const char *part) char buf[_BUF_MAX]; if (!strcmp(part, "elm.text")) { - snprintf(buf, sizeof(buf), "%s (%d)", _(group_name[(int)data]), - _get_grp_cnt((int)data)); + snprintf(buf, sizeof(buf), "%s (%d)", + T_(group_name[(int)data]), _get_grp_cnt((int)data)); return strdup(buf); } return NULL; @@ -513,7 +512,7 @@ static Evas_Object *_gl_content_get_his(void *data, Evas_Object *obj, } else if (!strcmp(part, "elm.icon.2")) { btn = elm_button_add(obj); - elm_object_text_set(btn, _("IDS_COM_OPT_DELETE")); + elm_object_text_set(btn, S_("IDS_COM_OPT_DELETE")); elm_object_style_set(btn, "default"); evas_object_smart_callback_add(btn, "clicked", @@ -633,6 +632,7 @@ _D("func\n"); (void *)i, git, ELM_GENLIST_ITEM_NONE, nl_sel, NULL); + elm_genlist_item_select_mode_set(item, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY); } } return 0; @@ -705,17 +705,17 @@ _D("func\n"); void _set_genlist(struct appdata *ad) { _D("func\n"); - int ret; retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + int ret = AUL_R_ERROR; _init_grp_cnt(); - aul_app_get_running_app_info(runapp_info_get, ad); + while (ret != AUL_R_OK) + ret = aul_app_get_running_app_info(runapp_info_get, ad); + taskmanager_get_history_app_info(ad); - ret = _set_genlist_from_eina(ad); - if (ret < 0) { - elm_exit(); - } + _set_genlist_from_eina(ad); + } void _init_pthread(void) @@ -799,6 +799,7 @@ _D("func\n"); retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); ad->ending = EINA_TRUE; +// egi = evas_object_data_get(ad->popup_ask, "selected_egi"); EINA_LIST_FOREACH_SAFE(ad->applist[TS_INUSE], l, l_next, info) { if (info->it == g_egi) { @@ -871,6 +872,7 @@ int response_del_history(struct appdata *ad) retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); _show_progressbar(ad); +// egi = evas_object_data_get(ad->popup_ask, "selected_egi"); EINA_LIST_FOREACH_SAFE(ad->applist[TS_HISTORY], l, l_next, info) { if (info->it == g_egi) { @@ -949,6 +951,7 @@ int response_kill_inuse(struct appdata *ad) retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); _show_progressbar(ad); +// egi = evas_object_data_get(ad->popup_ask, "selected_egi"); EINA_LIST_FOREACH_SAFE(ad->applist[TS_INUSE], l, l_next, info) { if (info->it == g_egi) { diff --git a/src/_genlist.h b/src/_genlist.h index b6a3fa8..fd15c30 100644 --- a/src/_genlist.h +++ b/src/_genlist.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_GENLIST_H__ diff --git a/src/_info.c b/src/_info.c index bf45470..33b41c5 100644 --- a/src/_info.c +++ b/src/_info.c @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include <stdio.h> diff --git a/src/_info.h b/src/_info.h index 45cac1e..dd721f4 100644 --- a/src/_info.h +++ b/src/_info.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_INFO_H__ diff --git a/src/_logic.c b/src/_logic.c index 655deb1..8285da0 100644..100755 --- a/src/_logic.c +++ b/src/_logic.c @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include <appcore-common.h> @@ -28,7 +30,6 @@ #include "_progressbar.h" #include "_info.h" - int _dead_cb(int pid, void *data) { _D("func\n"); @@ -148,7 +149,6 @@ int _app_create(struct appdata *ad) nv = _add_naviframe(ly); retvm_if(nv == NULL, -1, "Failed to add naviframe\n"); - evas_object_show(nv); ad->nv = nv; ly = _add_layout(ad->nv, EDJ_NAME, GRP_TM); @@ -166,7 +166,6 @@ int _app_create(struct appdata *ad) evas_object_smart_callback_add(gl, "scroll,anim,start", _anim_start_cb, ad); evas_object_smart_callback_add(gl, "scroll,anim,stop", _anim_stop_cb, ad); // evas_object_smart_callback_add(gl, "edge,bottom", _moved_cb, ad); - evas_object_show(gl); ad->gl = gl; bt = elm_button_add(nv); @@ -208,11 +207,12 @@ static Eina_Bool __climsg_cb(void *data, int type, void *event) static Atom a_deact; pid_t pid_a, pid_d; + struct appdata *ad = (struct appdata *)data; Ecore_X_Event_Client_Message *ev = event; if(ev == NULL) { _E("Invalid argument: event is NULL\n"); - ecore_timer_add(1.5, _exit_cb, NULL); + ecore_timer_add(0.3, _exit_cb, NULL); return ECORE_CALLBACK_CANCEL; } @@ -227,7 +227,7 @@ static Eina_Bool __climsg_cb(void *data, int type, void *event) if (ev->message_type == a_deact) { _D("exit after 1.0 sec\n"); - ecore_timer_add(1.5, _exit_cb, NULL); + ad->exit_timer = ecore_timer_add(0.3, _exit_cb, ad); return ECORE_CALLBACK_CANCEL; } else { _D("messagre is act\n"); @@ -246,18 +246,6 @@ static Eina_Bool _ask_kill_process(void *data) ad->mode *= 2; /* why? check enum in taskmgr.h */ - switch (ad->mode) { - case MODE_KILL_INUSE: - _D("kill all inuse\n"); - response_kill_inuse(ad); - break; - - case MODE_KILL_ALL_INUSE: - _D("kill all inuse\n"); - response_kill_all_inuse(ad); - break; - } -/* if (ad->popup_ask) { evas_object_del(ad->popup_ask); ad->popup_ask = NULL; @@ -265,7 +253,7 @@ static Eina_Bool _ask_kill_process(void *data) ad->popup_ask = _add_popup_ask(ad->win, "It might be an invalid process. Do you want to kill this proceess anyway?", ad); -*/ + return ECORE_CALLBACK_CANCEL; } @@ -352,7 +340,7 @@ Eina_Bool _create_idler_cb(void *data) _init_pthread(); _get_win_geometry(ad); _set_vconf_noti(ad); - ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __climsg_cb, NULL); + ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, __climsg_cb, ad); return ECORE_CALLBACK_CANCEL; } diff --git a/src/_logic.h b/src/_logic.h index 61f8b88..aff8338 100644 --- a/src/_logic.h +++ b/src/_logic.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_LOGIC_H__ diff --git a/src/_progressbar.c b/src/_progressbar.c index e961735..3c3b19f 100644 --- a/src/_progressbar.c +++ b/src/_progressbar.c @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include "taskmanager.h" diff --git a/src/_progressbar.h b/src/_progressbar.h index f983cf3..2664625 100644 --- a/src/_progressbar.h +++ b/src/_progressbar.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_PROGRESSBAR_H__ diff --git a/src/_util_efl.c b/src/_util_efl.c index def79ce..9f8d71a 100644 --- a/src/_util_efl.c +++ b/src/_util_efl.c @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include <appcore-efl.h> @@ -169,17 +171,17 @@ Evas_Object *_add_popup_ask(Evas_Object *parent, char *text, void *data) pu = elm_popup_add(parent); retvm_if(pu == NULL, NULL, "Falied to add popup\n"); evas_object_size_hint_weight_set(pu, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); - elm_object_part_text_set(pu, "title,text", D_("IDS_COM_POP_WARNING")); + elm_object_part_text_set(pu, "title,text", S_("IDS_COM_POP_WARNING")); elm_object_text_set(pu, text); evas_object_show(pu); bt1 = elm_button_add(pu); - elm_object_text_set(bt1, D_("IDS_COM_SK_OK")); + elm_object_text_set(bt1, S_("IDS_COM_SK_OK")); elm_object_part_content_set(pu, "button1", bt1); evas_object_smart_callback_add(bt1, "clicked", _ok_response_cb, data); bt2 = elm_button_add(pu); - elm_object_text_set(bt2, _("IDS_COM_POP_CANCEL")); + elm_object_text_set(bt2, S_("IDS_COM_POP_CANCEL")); elm_object_part_content_set(pu, "button2", bt2); evas_object_smart_callback_add(bt2, "clicked", _cancel_response_cb, data); diff --git a/src/_util_efl.h b/src/_util_efl.h index c933233..db7930a 100644 --- a/src/_util_efl.h +++ b/src/_util_efl.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_UTIL_EFL_H__ diff --git a/src/_util_log.h b/src/_util_log.h index c65a3d0..8143e7f 100644 --- a/src/_util_log.h +++ b/src/_util_log.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_UTIL_LOG_H__ diff --git a/src/taskmanager.c b/src/taskmanager.c index 2c0264e..afad212 100644..100755 --- a/src/taskmanager.c +++ b/src/taskmanager.c @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #include <stdio.h> @@ -100,6 +102,9 @@ static int rotate(enum appcore_rm m, void *data) Eina_Bool _exit_cb(void *data) { + struct appdata *ad = (struct appdata *)data; + + ad->exit_timer = NULL; elm_exit(); return ECORE_CALLBACK_CANCEL; } @@ -209,7 +214,9 @@ static int app_terminate(void *data) { _D("func\n"); struct appdata *ad = data; - evas_object_del(ad->win); +// sleep(1); +// ecore_timer_add(0.2, _exit_cb, NULL); + return 0; } @@ -217,14 +224,19 @@ static int app_pause(void *data) { _D("func\n"); _fini_pthread(); - elm_exit(); return 0; } static int app_resume(void *data) { _D("func\n"); -// elm_exit(); + struct appdata *ad = data; + + if (ad->exit_timer) { + ecore_timer_del(ad->exit_timer); + ad->exit_timer = NULL; + } + return 0; } diff --git a/src/taskmanager.h b/src/taskmanager.h index d77b835..47d9635 100644..100755 --- a/src/taskmanager.h +++ b/src/taskmanager.h @@ -1,18 +1,20 @@ - /* - * Copyright 2012 Samsung Electronics Co., Ltd - * - * Licensed under the Flora License, Version 1.0 (the License); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.tizenopensource.org/license - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an AS IS BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + #ifndef __TASKMANAGER_H__ @@ -51,7 +53,9 @@ #define EDJ_THEME EDJDIR"/theme_taskmanager.edj" #define GRP_TM "task_manager" -#define D_(str) dgettext("sys_string", str) +#define S_(str) dgettext("sys_string", str) +#define T_(str) dgettext(PACKAGE, str) + #define _BUF_MAX 256 #define _EDJ(x) elm_layout_edje_get(x) @@ -72,6 +76,7 @@ struct appdata { Evas_Object *popup_progressbar; Ecore_Timer *update_timer; + Ecore_Timer *exit_timer; double mem_total; |