[Password]: New design based changes, a new style removed password
authorShilpa Singh <shilpa.singh@samsung.com>
Mon, 4 Jul 2011 10:16:52 +0000 (15:46 +0530)
committerShilpa Singh <shilpa.singh@samsung.com>
Mon, 4 Jul 2011 10:58:38 +0000 (16:28 +0530)
mode controlled by config.

Change-Id: I6338929559a1224b079dc7edf2f7e474b44b3cc9

config/default/base.src
config/slp/base.src
config/standard/base.src
data/themes/default.edc
src/lib/elm_config.c
src/lib/elm_entry.c
src/lib/elm_priv.h

index d5f558a..eb99ae3 100644 (file)
@@ -37,4 +37,6 @@ group "Elm_Config" struct {
   value "longpress_timeout" double: 1.0;
   value "effect_enable" uchar: 1;
   value "desktop_entry" uchar: 0;
+  value "password_show_last" uchar: 0;
+  value "password_show_last_timeout" double: 2.0;
 }
index 171fb6d..e842c73 100644 (file)
@@ -37,6 +37,7 @@ group "Elm_Config" struct {
   value "icon_size" int: 32;
   value "longpress_timeout" double: 0.5;
   value "input_panel_enable" int: 1;
-  value "password_show_last_character" uchar: 1;
+  value "password_show_last" uchar: 1;
+  value "password_show_last_timeout" double: 2.0;
   value "effect_enable" uchar: 1;
 }
index 3b18fa1..469f7ac 100644 (file)
@@ -37,4 +37,6 @@ group "Elm_Config" struct {
   value "longpress_timeout" double: 1.0;
   value "effect_enable" uchar: 1;
   value "desktop_entry" uchar: 1;
+  value "password_show_last" uchar: 0;
+  value "password_show_last_timeout" double: 2.0;
 }
index f8da610..28628c2 100644 (file)
@@ -8973,68 +8973,6 @@ collections {
       }
    }
 
-   group { name: "elm/entry/custom-password/default";
-      parts {
-         part { name: "elm.text";
-            type: TEXTBLOCK;
-            mouse_events: 1;
-            scale: 1;
-            entry_mode: PASSWORD_SHOW_LAST_CHARACTER;
-            select_mode: EXPLICIT;
-            multiline: 0;
-            source: "elm/entry/selection/default"; // selection under
-            source4: "elm/entry/cursor/default"; // cursorover
-            source5: "elm/entry/anchor/default"; // anchor under
-            description { state: "default" 0.0;
-               text {
-                  style: "entry_single_textblock_style";
-                  repch: "*";
-                  min: 1 1;
-                  max: 0 1;
-               }
-            }
-            description { state: "disabled" 0.0;
-               inherit: "default" 0.0;
-               text {
-                  style: "entry_single_textblock_disabled_style";
-               }
-            }
-         }
-      }
-      programs {
-         program { name: "focus";
-            signal: "load";
-            source: "";
-            action: FOCUS_SET;
-            target: "elm.text";
-         }
-         program { name: "password_stop"; 
-            signal: "cursor,changed";
-            source: "elm.text";
-            action: ACTION_STOP;
-            target: "password_start";
-            after: "password_start";
-         }
-         program { name: "password_start";
-            in: 2.0 0.0;
-            action: HIDE_VISIBLE_PASSWORD;
-            target: "elm.text";
-         }
-         program { name: "disable";
-            signal: "elm,state,disabled";
-            source: "elm";
-            action: STATE_SET "disabled" 0.0;
-            target: "elm.text";
-         }
-         program { name: "enable";
-            signal: "elm,state,enabled";
-            source: "elm";
-            action: STATE_SET "default" 0.0;
-            target: "elm.text";
-         }
-      }
-   }
-
    group { name: "elm/entry/cursor/default";
       images {
          image: "cur_box.png" COMP;
index c2b8875..3cd4d9e 100644 (file)
@@ -662,8 +662,9 @@ _desc_init(void)
    ELM_CONFIG_VAL(D, T, longpress_timeout, T_DOUBLE);
    ELM_CONFIG_VAL(D, T, effect_enable, T_UCHAR);
    ELM_CONFIG_VAL(D, T, desktop_entry, T_UCHAR);
-   ELM_CONFIG_VAL(D, T, password_show_last_character, T_UCHAR);
    ELM_CONFIG_VAL(D, T, input_panel_enable, T_INT);
+   ELM_CONFIG_VAL(D, T, password_show_last, T_UCHAR);
+   ELM_CONFIG_VAL(D, T, password_show_last_timeout, T_DOUBLE);
 #undef T
 #undef D
 #undef T_INT
@@ -1066,6 +1067,8 @@ _config_sub_apply(void)
 {
    edje_frametime_set(1.0 / _elm_config->fps);
    edje_scale_set(_elm_config->scale);
+   edje_password_show_last_set(_elm_config->password_show_last);
+   edje_password_show_last_timeout_set(_elm_config->password_show_last_timeout);
    if (_elm_config->modules) _elm_module_parse(_elm_config->modules);
    edje_input_panel_enabled_set(_elm_config->input_panel_enable);
    edje_autocapitalization_allow_set(_elm_config->autocapital_allow);
@@ -1217,10 +1220,9 @@ _config_load(void)
    _elm_config->longpress_timeout = 1.0;
    _elm_config->effect_enable = EINA_TRUE;
    _elm_config->desktop_entry = EINA_FALSE;
-
    _elm_config->is_mirrored = EINA_FALSE; /* Read sys value in env_get() */
-
-   _elm_config->password_show_last_character = EINA_FALSE;
+   _elm_config->password_show_last = EINA_FALSE;
+   _elm_config->password_show_last_timeout = 2.0;
 }
 
 static const char *
@@ -1610,8 +1612,16 @@ _env_get(void)
    s = getenv("ELM_FINGER_SIZE");
    if (s) _elm_config->finger_size = atoi(s);
 
-   s = getenv("ELM_PASSWORD_SHOW_LAST_CHARACTER");
-   if (s) _elm_config->password_show_last_character = !!atoi(s);
+   s = getenv("ELM_PASSWORD_SHOW_LAST");
+   if (s) _elm_config->password_show_last = !!atoi(s);
+
+   s = getenv("ELM_PASSWORD_SHOW_LAST_TIMEOUT");
+   if (s)
+     {
+        double pw_show_last_timeout = atof(s);
+        if (pw_show_last_timeout >= 0.0)
+          _elm_config->password_show_last_timeout = pw_show_last_timeout;
+     }
 
    s = getenv("ELM_FPS");
    if (s) _elm_config->fps = atof(s);
index 6c95cb6..970c5df 100644 (file)
@@ -143,7 +143,6 @@ struct _Widget_Data
    Eina_Bool char_linewrap : 1;
    Eina_Bool single_line : 1;
    Eina_Bool password : 1;
-   Eina_Bool show_last_character : 1;
    Eina_Bool editable : 1;
    Eina_Bool selection_asked : 1;
    Eina_Bool have_selection : 1;
@@ -1369,11 +1368,7 @@ _getbase(Evas_Object *obj)
    if (!wd) return "base";
    if (wd->editable)
      {
-        if (wd->password)
-          {
-             if (wd->show_last_character) return "custom-password";
-             else return "base-password";
-          }
+        if (wd->password) return "base-password";
        else
          {
             if (wd->single_line) return "base-single";
@@ -1387,11 +1382,7 @@ _getbase(Evas_Object *obj)
      }
    else
      {
-        if (wd->password)
-          {
-             if (wd->show_last_character) return "custom-password";
-             else return "base-password";
-          }
+        if (wd->password) return "base-password";
        else
          {
             if (wd->single_line) return "base-single-noedit";
@@ -2532,8 +2523,6 @@ elm_entry_password_set(Evas_Object *obj, Eina_Bool password)
    wd->single_line = EINA_TRUE;
    wd->linewrap = EINA_FALSE;
    wd->char_linewrap = EINA_FALSE;
-   if (_elm_config->password_show_last_character)
-     wd->show_last_character = EINA_TRUE;
    _theme_hook(obj);
 }
 
index ea5e1b3..7296dbd 100644 (file)
@@ -198,7 +198,8 @@ struct _Elm_Config
    int input_panel_enable;
    int autocapital_allow;
    int autoperiod_allow;   
-   Eina_Bool    password_show_last_character;
+   Eina_Bool      password_show_last;
+   double         password_show_last_timeout;
 };
 
 struct _Elm_Module