Sync magnolia to RSA.
authorhhh.kwon <hhh.kwon@samsung.com>
Fri, 23 Nov 2012 17:17:28 +0000 (02:17 +0900)
committerhhh.kwon <hhh.kwon@samsung.com>
Fri, 23 Nov 2012 17:17:28 +0000 (02:17 +0900)
src/_genlist.c
src/_logic.c
src/taskmanager.c
src/taskmanager.h

index a8c7c57..1316de5 100755 (executable)
@@ -297,6 +297,7 @@ _D("func\n");
        }
 }
 
+
 static Evas_Object *_gl_content_get_app(void *data, Evas_Object *obj,
                                     const char *part)
 {
@@ -531,7 +532,7 @@ void _set_itc(void)
        itc_separator4.item_style = "dialogue/seperator.4";
        itc_separator2.item_style = "dialogue/seperator.2";
 
-       itc_bl.item_style = "dialogue/bg/1icon";
+       itc_bl.item_style = "1icon";
        itc_bl.func.content_get = _bl_content_get;
 
        itc_nl.item_style = "1text";
index efe6222..18fdf7d 100755 (executable)
@@ -178,7 +178,7 @@ int _app_create(struct appdata *ad)
        evas_object_smart_callback_add(bt, "clicked", _back_cb, ad);
 
        elm_naviframe_item_push(nv,
-                       _("IDS_TASKMGR_HEADER_TASK_SWITCHER"),
+                       T_("IDS_TASKMGR_HEADER_TASK_SWITCHER"),
                        bt, NULL, ly, NULL);
 
        return 0;
@@ -194,17 +194,6 @@ static void _get_win_geometry(struct appdata *ad)
        ecore_x_window_size_get(root_win, &ad->root_w, &ad->root_h);
 }
 
-static void _vconf_noti_cb(keynode_t *node, void *data)
-{
-       elm_exit();
-}
-
-static void _set_vconf_noti(void *data)
-{
-       vconf_notify_key_changed(VCONFKEY_IDLE_LOCK_STATE,
-                       _vconf_noti_cb, NULL);
-}
-
 /* this func is to exit taskmanager after launching application */
 static Eina_Bool __climsg_cb(void *data, int type, void *event)
 {
@@ -230,7 +219,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");
+               _D("exit after 0.3 sec\n");
                ad->exit_timer = ecore_timer_add(0.3, _exit_cb, ad);
                return ECORE_CALLBACK_CANCEL;
        } else {
@@ -241,26 +230,6 @@ static Eina_Bool __climsg_cb(void *data, int type, void *event)
        return ECORE_CALLBACK_CANCEL;
 }
 
-static Eina_Bool _ask_kill_process(void *data)
-{
-       struct appdata *ad = data;
-
-       _del_progressbar(ad);
-
-       ad->mode *= 2;
-       /* why? check enum in taskmgr.h */
-
-       if (ad->popup_ask) {
-               evas_object_del(ad->popup_ask);
-               ad->popup_ask = NULL;
-       }
-       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;
-}
-
 void _ok_response_cb(void *data, Evas_Object *obj, void *event_info)
 {
        struct appdata *ad = (struct appdata *)data;
@@ -275,7 +244,6 @@ void _ok_response_cb(void *data, Evas_Object *obj, void *event_info)
                case MODE_END_INUSE:
                        _D("end inuse\n");
                        _del_popup_timer(ad);
-                       ad->popup_timer = ecore_timer_add(7.0, _ask_kill_process, ad);
                        _show_progressbar(ad);
                        response_end_inuse(ad);
                        _restart_pthread(ad);
@@ -284,7 +252,6 @@ void _ok_response_cb(void *data, Evas_Object *obj, void *event_info)
                case MODE_END_ALL_INUSE:
                        _D("end all inuse\n");
                        _del_popup_timer(ad);
-                       ad->popup_timer = ecore_timer_add(7.0, _ask_kill_process, ad);
                        _show_progressbar(ad);
                        response_end_all_inuse(ad);
                        break;
@@ -292,14 +259,12 @@ void _ok_response_cb(void *data, Evas_Object *obj, void *event_info)
                case MODE_DEL_HISTORY:
                        _D("del inuse\n");
                        _del_popup_timer(ad);
-                       ad->popup_timer = ecore_timer_add(5.0, _ask_kill_process, ad);
                        response_del_history(ad);
                        break;
 
                case MODE_DEL_ALL_HISTORY:
                        _D("del all inuse\n");
                        _del_popup_timer(ad);
-                       ad->popup_timer = ecore_timer_add(5.0, _ask_kill_process, ad);
                        response_del_all_history(ad);
                        break;
 
@@ -343,7 +308,6 @@ 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, ad);
 
        return ECORE_CALLBACK_CANCEL;
index 6407ca8..bef8a72 100755 (executable)
@@ -38,6 +38,12 @@ struct text_part {
        char *msgid;
 };
 
+enum {
+       IDLELOCK_OFF = 0x0,
+       IDLELOCK_ON,
+       IDLELOCK_MAX,
+};
+
 static struct text_part main_txt[] = {
 };
 
@@ -100,12 +106,30 @@ static int rotate(enum appcore_rm m, void *data)
        return 0;
 }
 
+int _get_vconf_idlelock(void)
+{
+       int ret = -1;
+       int lock = IDLELOCK_OFF;
+
+       ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock);
+       retvm_if(ret < 0, -1, "Failed to get vconf %s\n",
+                VCONFKEY_IDLE_LOCK_STATE);
+       _D("idlelock vconf:%d\n", lock);
+
+       return lock == VCONFKEY_IDLE_LOCK ? IDLELOCK_ON : IDLELOCK_OFF;
+}
+
 Eina_Bool _exit_cb(void *data)
 {
        struct appdata *ad = (struct appdata *)data;
 
        ad->exit_timer = NULL;
-       elm_exit();
+       if(_get_vconf_idlelock() == IDLELOCK_ON){
+               elm_exit();
+       }
+       else{
+               _D("IDLELOCK is set, taskmnager doesn't exit\n");
+       }
        return ECORE_CALLBACK_CANCEL;
 }
 
@@ -187,6 +211,12 @@ int app_create(void *data)
        _set_launch_effect(win);
 //     _set_notification_level(win, UTILX_NOTIFICATION_LEVEL_NORMAL);
 
+       /* init internationalization */
+       r = appcore_set_i18n(PACKAGE, LOCALEDIR);
+       retvm_if(r < 0, -1, "Failed to set i18n\n");
+       _lang_changed(ad);
+
+
        elm_theme_extension_add(NULL, EDJ_THEME);
 
        _app_create(ad);
@@ -196,11 +226,6 @@ int app_create(void *data)
        /* set dead signal listener */
        aul_listen_app_dead_signal(_dead_cb, ad);
 
-       /* init internationalization */
-       r = appcore_set_i18n(PACKAGE, LOCALEDIR);
-       retvm_if(r < 0, -1, "Failed to set i18n\n");
-       _lang_changed(ad);
-
        appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE,
                        _lang_changed, ad);
 
@@ -232,6 +257,7 @@ static int app_resume(void *data)
 _D("func\n");
        struct appdata *ad = data;
 
+       refresh_app_info(ad);
        if (ad->exit_timer) {
                ecore_timer_del(ad->exit_timer);
                ad->exit_timer = NULL;
index 73e3af3..b5cb730 100755 (executable)
@@ -54,7 +54,7 @@
 #define GRP_TM "task_manager"
 
 #define S_(str) dgettext("sys_string", str)
-#define T_(str) dgettext(PACKAGE, str)
+#define T_(str) gettext(str)
 
 #define _BUF_MAX       256
 #define _EDJ(x)        elm_layout_edje_get(x)