Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        Makefile.am e_fm.c e_fm.h e_includes.h e_test.c e_thumb.c 
        e_thumb_main.c e_utils.c e_utils.h e_widget_scrollframe.c 
        e_widget_scrollframe.h 
Added Files:
        e_sha1.c e_sha1.h 


Log Message:


and some major refinements of efm - the selector code - well its in e_test.c
is pretty much almost perfectly working. i have fixed up some e_thumb stuff
and allowed e_thumb to be more responsive and skip items that are known to be
"generated" and bring them ahead in the list of things to thumb - so kind of
a priority skiplist - process what it KNOWS will be already done first
quickly and leave the slower stuff until later. efm is fairly well refined
now - as above. the test selector works nicely. also added an almost-sha1
generator - use sha1 sums of the path for thumbs - less likelihood of
collisions. the prolbme is given the small size of the input data... it's
hard to do well - but anyway :)

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/Makefile.am,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -3 -r1.128 -r1.129
--- Makefile.am 21 Jul 2006 20:16:46 -0000      1.128
+++ Makefile.am 22 Jul 2006 21:48:24 -0000      1.129
@@ -164,7 +164,8 @@
 e_int_border_prop.h \
 e_entry_dialog.h \
 e_fm.h \
-e_widget_scrollframe.h
+e_widget_scrollframe.h \
+e_sha1.h
 
 enlightenment_src = \
 e_user.c \
@@ -305,6 +306,7 @@
 e_entry_dialog.c \
 e_fm.c \
 e_widget_scrollframe.c \
+e_sha1.c \
 $(ENLIGHTENMENTHEADERS)
 
 enlightenment_SOURCES = \
@@ -345,7 +347,9 @@
 enlightenment_start_LDFLAGS = 
 
 enlightenment_thumb_SOURCES = \
-e_thumb_main.c
+e_thumb_main.c \
+e_sha1.c \
+e_sha1.h
 
 enlightenment_thumb_LDFLAGS = @e_libs@ @dlopen_libs@
 
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- e_fm.c      20 Jul 2006 19:58:22 -0000      1.11
+++ e_fm.c      22 Jul 2006 21:48:24 -0000      1.12
@@ -3,7 +3,11 @@
  */
 #include "e.h"
 
-/* IGNORE this code for now! */
+/* FIXME: this is NOT complete. dnd doesnt work. only list view works.
+ * in icon view it needs to be much better about placement of icons and
+ * being able to save/load icon placement. it doesn't support backgrounds or
+ * custom frames or icons yet
+ */
 
 typedef struct _E_Fm2_Smart_Data E_Fm2_Smart_Data;
 typedef struct _E_Fm2_Region     E_Fm2_Region;
@@ -57,20 +61,14 @@
    Evas_Object      *obj, *obj_icon;
    int               saved_x, saved_y;
    int               saved_rel;
-   const char       *file;
-   const char       *mime;
-   const char       *label;
-   const char       *comment;
-   const char       *generic;
-   const char       *icon;
-   const char       *link;
-   struct stat       st;
+
+   E_Fm2_Icon_Info   info;
+   
    unsigned char     realized : 1;
    unsigned char     selected : 1;
    unsigned char     last_selected : 1;
    unsigned char     saved_pos : 1;
    unsigned char     odd : 1;
-   unsigned char     mount : 1;
 };
 
 static const char *_e_fm2_dev_path_map(const char *dev, const char *path);
@@ -189,31 +187,33 @@
    /* internal config for now - don't see a pont making this configurable */
    sd->regions.member_max = 32;
 
-   if (sd->config) _e_fm2_config_free(sd->config);
-   sd->config = E_NEW(E_Fm2_Config, 1);
-   if (!sd->config) return;
+   if (!sd->config)
+     {
+       sd->config = E_NEW(E_Fm2_Config, 1);
+       if (!sd->config) return;
 //   sd->config->view.mode = E_FM2_VIEW_MODE_ICONS;
-   sd->config->view.mode = E_FM2_VIEW_MODE_LIST;
-   sd->config->view.open_dirs_in_place = 1;
-   sd->config->view.selector = 1;
-   sd->config->view.single_click = 0;
-   sd->config->view.no_subdir_jump = 0;
-   sd->config->icon.icon.w = 64;
-   sd->config->icon.icon.h = 64;
-   sd->config->icon.list.w = 24;
-   sd->config->icon.list.h = 24;
-   sd->config->icon.fixed.w = 1;
-   sd->config->icon.fixed.h = 1;
-   sd->config->icon.extension.show = 0;
-   sd->config->list.sort.no_case = 1;
-   sd->config->list.sort.dirs.first = 1;
-   sd->config->list.sort.dirs.last = 1;
-   sd->config->selection.single = 0;
-   sd->config->selection.windows_modifiers = 0;
-   sd->config->theme.background = NULL;
-   sd->config->theme.frame = NULL;
-   sd->config->theme.icons = NULL;
-   sd->config->theme.fixed = 0;
+       sd->config->view.mode = E_FM2_VIEW_MODE_LIST;
+       sd->config->view.open_dirs_in_place = 1;
+       sd->config->view.selector = 1;
+       sd->config->view.single_click = 0;
+       sd->config->view.no_subdir_jump = 0;
+       sd->config->icon.icon.w = 64;
+       sd->config->icon.icon.h = 64;
+       sd->config->icon.list.w = 24;
+       sd->config->icon.list.h = 24;
+       sd->config->icon.fixed.w = 1;
+       sd->config->icon.fixed.h = 1;
+       sd->config->icon.extension.show = 0;
+       sd->config->list.sort.no_case = 1;
+       sd->config->list.sort.dirs.first = 1;
+       sd->config->list.sort.dirs.last = 0;
+       sd->config->selection.single = 0;
+       sd->config->selection.windows_modifiers = 0;
+       sd->config->theme.background = NULL;
+       sd->config->theme.frame = NULL;
+       sd->config->theme.icons = NULL;
+       sd->config->theme.fixed = 0;
+     }
    
    _e_fm2_scan_stop(obj);
    _e_fm2_queue_free(obj);
@@ -226,7 +226,6 @@
    if (dev) sd->dev = evas_stringshare_add(dev);
    sd->path = evas_stringshare_add(path);
    sd->realpath = _e_fm2_dev_path_map(sd->dev, sd->path);
-   printf("FM: %s\n", sd->realpath);
    _e_fm2_scan_start(obj);
    evas_object_smart_callback_call(obj, "changed", NULL);
 }
@@ -260,6 +259,18 @@
    return 1;
 }
 
+EAPI const char *
+e_fm2_real_path_get(Evas_Object *obj)
+{
+   E_Fm2_Smart_Data *sd;
+
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL; // safety
+   if (!evas_object_type_get(obj)) return NULL; // safety
+   if (strcmp(evas_object_type_get(obj), "e_fm")) return NULL; // safety
+   return sd->realpath;
+}
+
 EAPI void
 e_fm2_parent_go(Evas_Object *obj)
 {
@@ -280,7 +291,6 @@
    E_FREE(path);
 }
 
-/*
 EAPI void
 e_fm2_config_set(Evas_Object *obj, E_Fm2_Config *cfg)
 {
@@ -290,6 +300,15 @@
    if (!sd) return; // safety
    if (!evas_object_type_get(obj)) return; // safety
    if (strcmp(evas_object_type_get(obj), "e_fm")) return; // safety
+   if (sd->config) _e_fm2_config_free(sd->config);
+   sd->config = NULL;
+   if (!cfg) return;
+   sd->config = E_NEW(E_Fm2_Config, 1);
+   if (!sd->config) return;
+   memcpy(sd->config, cfg, sizeof(E_Fm2_Config));
+   if (cfg->theme.background) sd->config->theme.background = 
evas_stringshare_add(cfg->theme.background);
+   if (cfg->theme.frame) sd->config->theme.frame = 
evas_stringshare_add(cfg->theme.frame);
+   if (cfg->theme.icons) sd->config->theme.icons = 
evas_stringshare_add(cfg->theme.icons);
 }
 
 EAPI E_Fm2_Config *
@@ -298,11 +317,78 @@
    E_Fm2_Smart_Data *sd;
 
    sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL; // safety
+   if (!evas_object_type_get(obj)) return NULL; // safety
+   if (strcmp(evas_object_type_get(obj), "e_fm")) return NULL; // safety
+   return sd->config;
+}
+
+EAPI Evas_List *
+e_fm2_selected_list_get(Evas_Object *obj)
+{
+   E_Fm2_Smart_Data *sd;
+   Evas_List *list = NULL, *l;
+   E_Fm2_Icon *ic;
+
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL; // safety
+   if (!evas_object_type_get(obj)) return NULL; // safety
+   if (strcmp(evas_object_type_get(obj), "e_fm")) return NULL; // safety
+   for (l = sd->icons; l; l = l->next)
+     {
+       ic = l->data;
+       if (ic->selected)
+         list = evas_list_append(list, &(ic->info));
+     }
+   return list;
+}
+
+EAPI Evas_List *
+e_fm2_all_list_get(Evas_Object *obj)
+{
+   E_Fm2_Smart_Data *sd;
+   Evas_List *list = NULL, *l;
+   E_Fm2_Icon *ic;
+
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL; // safety
+   if (!evas_object_type_get(obj)) return NULL; // safety
+   if (strcmp(evas_object_type_get(obj), "e_fm")) return NULL; // safety
+   for (l = sd->icons; l; l = l->next)
+     {
+       ic = l->data;
+       list = evas_list_append(list, &(ic->info));
+     }
+   return list;
+}
+
+EAPI void
+e_fm2_select_set(Evas_Object *obj, char *file, int select)
+{
+   E_Fm2_Smart_Data *sd;
+   Evas_List *l;
+   E_Fm2_Icon *ic;
+   
+   sd = evas_object_smart_data_get(obj);
    if (!sd) return; // safety
    if (!evas_object_type_get(obj)) return; // safety
    if (strcmp(evas_object_type_get(obj), "e_fm")) return; // safety
+   for (l = sd->icons; l; l = l->next)
+     {
+       ic = l->data;
+       if (!strcmp(ic->info.file, file))
+         {
+            if (select) _e_fm2_icon_select(ic);
+            else _e_fm2_icon_deselect(ic);
+         }
+       else
+         {
+            if (ic->sd->config->view.single_click)
+              _e_fm2_icon_deselect(ic);
+            ic->last_selected = 0;
+         }
+     }
 }
-*/
 
 EAPI void
 e_fm2_pan_set(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
@@ -320,7 +406,6 @@
    if ((sd->pos.x == x) && (sd->pos.y == y)) return;
    sd->pos.x = x;
    sd->pos.y = y;
-   printf("POS %i %i\n", x, y);
    if (sd->scroll_job) ecore_job_del(sd->scroll_job);
    sd->scroll_job = ecore_job_add(_e_fm2_cb_scroll_job, obj);
 }
@@ -398,6 +483,19 @@
       PRT("%s%s", s, path);
       free(s);
    }
+   else if (dev[0] == '/') {
+      /* dev is a full path - consider it a mountpoint device on its own */
+      PRT("%s%s", dev, path);
+   }
+   else if (CMP("favorites")) {
+      /* this is a virtual device - it's where your favorites list is 
+       * stored - a dir with .desktop files or symlinks (in fact anything
+       * you like
+       */
+      s = e_user_homedir_get();
+      PRT("%s/.e/e/fileman/favorites", s);
+      free(s);
+   }
    else if (CMP("dvd") || CMP("dvd-*"))  {
       /* FIXME: find dvd mountpoint optionally for dvd no. X */
       /* maybe make part of the device mappings config? */
@@ -524,6 +622,7 @@
    sd->icons = evas_list_sort(sd->icons, evas_list_count(sd->icons), 
_e_fm2_cb_icon_sort);
    if (sd->resize_job) ecore_job_del(sd->resize_job);
    sd->resize_job = ecore_job_add(_e_fm2_cb_resize_job, obj);
+   evas_object_smart_callback_call(sd->obj, "files_changed", NULL);
 }
 
 static void
@@ -866,21 +965,25 @@
    E_Fm2_Icon *ic;
    Evas_Coord mw = 0, mh = 0;
    Evas_Object *obj, *obj2;
-   char buf[4096], buf2[4096];
+   char buf[4096], *lnk;
    
    /* create icon */
    ic = E_NEW(E_Fm2_Icon, 1);
    snprintf(buf, sizeof(buf), "%s/%s", sd->realpath, file);
-   if (stat(buf, &(ic->st)) == -1)
+   if (stat(buf, &(ic->info.statinfo)) == -1)
      {
        free(ic);
        return NULL;
      }
    ic->sd = sd;
-   ic->file = evas_stringshare_add(file);
-   if (readlink(buf, buf2, sizeof(buf2) - 1) == 0)
-     ic->link = evas_stringshare_add(buf2);
-   if (e_util_glob_case_match(ic->file, "*.desktop"))
+   ic->info.file = evas_stringshare_add(file);
+   lnk = ecore_file_readlink(buf);
+   if (lnk)
+     {
+       ic->info.link = evas_stringshare_add(lnk);
+       free(lnk);
+     }
+   if (e_util_glob_case_match(ic->info.file, "*.desktop"))
      _e_fm2_icon_desktop_load(ic);
     switch (sd->config->view.mode)
      {
@@ -956,13 +1059,13 @@
 {
    /* free icon, object data etc. etc. */
    _e_fm2_icon_unrealize(ic);
-   if (ic->file) evas_stringshare_del(ic->file);
-   if (ic->mime) evas_stringshare_del(ic->mime);
-   if (ic->label) evas_stringshare_del(ic->label);
-   if (ic->comment) evas_stringshare_del(ic->comment);
-   if (ic->generic) evas_stringshare_del(ic->generic);
-   if (ic->icon) evas_stringshare_del(ic->icon);
-   if (ic->link) evas_stringshare_del(ic->link);
+   if (ic->info.file) evas_stringshare_del(ic->info.file);
+   if (ic->info.mime) evas_stringshare_del(ic->info.mime);
+   if (ic->info.label) evas_stringshare_del(ic->info.label);
+   if (ic->info.comment) evas_stringshare_del(ic->info.comment);
+   if (ic->info.generic) evas_stringshare_del(ic->info.generic);
+   if (ic->info.icon) evas_stringshare_del(ic->info.icon);
+   if (ic->info.link) evas_stringshare_del(ic->info.link);
    free(ic);
 }
 
@@ -1065,20 +1168,20 @@
    char buf[4096], *p;
    int len;
 
-   if (ic->label)
+   if (ic->info.label)
      {
-       edje_object_part_text_set(obj, "label", ic->label);
+       edje_object_part_text_set(obj, "label", ic->info.label);
        return;
      }
    if (ic->sd->config->icon.extension.show)
-     edje_object_part_text_set(obj, "label", ic->file);
+     edje_object_part_text_set(obj, "label", ic->info.file);
    else
      {
        /* remove extension. handle double extensions like .tar.gz too
         * also be fuzzy - up to 4 chars of extn is ok - eg .html but 5 or
         * more is considered part of the name
         */
-       strncpy(buf, ic->file, sizeof(buf) - 2);
+       strncpy(buf, ic->info.file, sizeof(buf) - 2);
        buf[sizeof(buf) - 1] = 0;
        
        len = strlen(buf);
@@ -1101,30 +1204,30 @@
    char buf[4096];
    
    if (!ic->realized) return;
-   if (ic->icon)
+   if (ic->info.icon)
      {
        /* custom icon */
        /* FIXME:
-        * if ic->icon == blah then use theme icon
-        * if ic->icon == blah/blah2 then use theme icon
-        * if ic->icon == /blah/blah2.xxx then use full path
-        * if ic->icon == blah.xxx then use relative path to icon dirs
-        * if ic->icon == blah/blah2.xxx then use relative path to icon dirs
+        * if ic->info.icon == blah then use theme icon
+        * if ic->info.icon == blah/blah2 then use theme icon
+        * if ic->info.icon == /blah/blah2.xxx then use full path
+        * if ic->info.icon == blah.xxx then use relative path to icon dirs
+        * if ic->info.icon == blah/blah2.xxx then use relative path to icon 
dirs
         */
        /* theme icon */
        ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj));
-        e_util_edje_icon_set(ic->obj_icon, ic->icon);
+        e_util_edje_icon_set(ic->obj_icon, ic->info.icon);
         edje_object_part_swallow(ic->obj, "icon_swallow", ic->obj_icon);
        evas_object_show(ic->obj_icon);
        return;
      }
-   if (ic->mime)
+   if (ic->info.mime)
      {
        /* use mime type to select icon */
        return;
      }
    /* fallback */
-   if (S_ISDIR(ic->st.st_mode))
+   if (S_ISDIR(ic->info.statinfo.st_mode))
      {
        ic->obj_icon = edje_object_add(evas_object_evas_get(ic->sd->obj));
        e_theme_edje_object_set(ic->obj_icon, "base/theme/fileman",
@@ -1135,48 +1238,48 @@
    else
      {
        if (
-           (e_util_glob_case_match(ic->file, "*.jpg")) ||
-           (e_util_glob_case_match(ic->file, "*.jpeg")) ||
-           (e_util_glob_case_match(ic->file, "*.jfif")) ||
-           (e_util_glob_case_match(ic->file, "*.jpe")) ||
-           (e_util_glob_case_match(ic->file, "*.png")) ||
-           (e_util_glob_case_match(ic->file, "*.gif")) ||
-           (e_util_glob_case_match(ic->file, "*.tif")) ||
-           (e_util_glob_case_match(ic->file, "*.tiff"))
+           (e_util_glob_case_match(ic->info.file, "*.jpg")) ||
+           (e_util_glob_case_match(ic->info.file, "*.jpeg")) ||
+           (e_util_glob_case_match(ic->info.file, "*.jfif")) ||
+           (e_util_glob_case_match(ic->info.file, "*.jpe")) ||
+           (e_util_glob_case_match(ic->info.file, "*.png")) ||
+           (e_util_glob_case_match(ic->info.file, "*.gif")) ||
+           (e_util_glob_case_match(ic->info.file, "*.tif")) ||
+           (e_util_glob_case_match(ic->info.file, "*.tiff"))
            )
          {
-            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->file);
+            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, 
ic->info.file);
             ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj));
             e_thumb_icon_file_set(ic->obj_icon, buf, NULL);
             e_thumb_icon_size_set(ic->obj_icon, 64, 64);
             evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", 
_e_fm2_cb_icon_thumb_gen, ic);
-            e_thumb_icon_begin(ic->obj_icon);
+            if (_e_fm2_icon_visible(ic)) e_thumb_icon_begin(ic->obj_icon);
             edje_object_part_swallow(ic->obj, "icon_swallow", ic->obj_icon);
             evas_object_show(ic->obj_icon);
          }
        else if (
-                (e_util_glob_case_match(ic->file, "*.edj"))
+                (e_util_glob_case_match(ic->info.file, "*.edj"))
                 )
          {
-            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->file);
+            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, 
ic->info.file);
             ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj));
             e_thumb_icon_file_set(ic->obj_icon, buf, "desktop/background");
             e_thumb_icon_size_set(ic->obj_icon, 64, 64);
             evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", 
_e_fm2_cb_icon_thumb_gen, ic);
-            e_thumb_icon_begin(ic->obj_icon);
+            if (_e_fm2_icon_visible(ic)) e_thumb_icon_begin(ic->obj_icon);
             edje_object_part_swallow(ic->obj, "icon_swallow", ic->obj_icon);
             evas_object_show(ic->obj_icon);
          }
        else if (
-                (e_util_glob_case_match(ic->file, "*.eap"))
+                (e_util_glob_case_match(ic->info.file, "*.eap"))
                 )
          {
-            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->file);
+            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, 
ic->info.file);
             ic->obj_icon = e_thumb_icon_add(evas_object_evas_get(ic->sd->obj));
             e_thumb_icon_file_set(ic->obj_icon, buf, "icon");
             e_thumb_icon_size_set(ic->obj_icon, 64, 64);
             evas_object_smart_callback_add(ic->obj_icon, "e_thumb_gen", 
_e_fm2_cb_icon_thumb_gen, ic);
-            e_thumb_icon_begin(ic->obj_icon);
+            if (_e_fm2_icon_visible(ic)) e_thumb_icon_begin(ic->obj_icon);
             edje_object_part_swallow(ic->obj, "icon_swallow", ic->obj_icon);
             evas_object_show(ic->obj_icon);
          }
@@ -1221,50 +1324,16 @@
 static const char *
 _e_fm2_icon_desktop_url_eval(const char *val)
 {
-   char *path, *p, buf[4096], *pd, *e1, *e2;
+   char *path, *p, *s;
    
    if (strlen(val) < 6) return NULL;
    if (strncmp(val, "file:", 5)) return NULL;
-   path = val + 5;
-   buf[0] = 0;
-   p = path;
-   pd = buf;
-   e1 = e2 = NULL;
-   /* FIXME: evaluate any shell vars - eg:
-    * $XX/blah/$HOME/blah2/$A$B
-    */
-   while (*p)
-     {
-/*     
-       if (*p == '$')
-         {
-            if (e1)
-              {
-                 e2 = p;
-                 
-                 e1 = NULL;
-                 e2 = NULL;
-              }
-            else
-              e1 = p + 1;
-         }
-       else if (e1)
-         {
-            if (!(isalnum(*p) || (*p == '_')))
-              {
-                 e2 = p;
-                 
-                 e1 = NULL;
-                 e2 = NULL;
-              }
-         }
- */
-       *pd = *p;
-       p++;
-       pd++;
-     }
-   *pd = 0;
-   return evas_stringshare_add(buf);
+   path = (char *)val + 5;
+   p = e_util_shell_env_path_eval(path);
+   if (!p) return NULL;
+   s = evas_stringshare_add(p);
+   free(p);
+   return s;
 }
 
 static int
@@ -1273,21 +1342,24 @@
    char buf[4096], key[256], val[4096];
    FILE *f;
    
-   snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->file);
+   snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file);
    f = fopen(buf, "rb");
    if (!f) return 0;
    if (!fgets(buf, sizeof(buf), f)) goto error;
    if (strcmp(buf, "[Desktop Entry]\n")) goto error;
    while (fscanf(f, "%255[^=]=%4095[^\n]\n", key, val) == 2)
      {
-       printf("%s=%s\n", key, val);
-       if      (!strcmp(key, "Name")) ic->label = evas_stringshare_add(val);
-       else if (!strcmp(key, "Comment")) ic->comment = 
evas_stringshare_add(val);
-       else if (!strcmp(key, "Generic")) ic->generic = 
evas_stringshare_add(val);
-       else if (!strcmp(key, "Icon")) ic->icon = evas_stringshare_add(val);
+       if      (!strcmp(key, "Name"))
+         ic->info.label = evas_stringshare_add(val);
+       else if (!strcmp(key, "Comment"))
+         ic->info.comment = evas_stringshare_add(val);
+       else if (!strcmp(key, "Generic"))
+         ic->info.generic = evas_stringshare_add(val);
+       else if (!strcmp(key, "Icon"))
+         ic->info.icon = evas_stringshare_add(val);
        else if (!strcmp(key, "Type"))
          {
-            if (!strcmp(val, "Mount")) ic->mount = 1;
+            if (!strcmp(val, "Mount")) ic->info.mount = 1;
             else if (!strcmp(val, "Link"))
               {
               }
@@ -1295,25 +1367,25 @@
               goto error;
          }
        else if (!strcmp(key, "File"))
-         ic->link = _e_fm2_icon_desktop_url_eval(val);
+         ic->info.link = _e_fm2_icon_desktop_url_eval(val);
        else if (!strcmp(key, "URL"))
-         ic->link = _e_fm2_icon_desktop_url_eval(val);
+         ic->info.link = _e_fm2_icon_desktop_url_eval(val);
        else if (!strcmp(key, "Path"))
-         ic->link = _e_fm2_icon_desktop_url_eval(val);
+         ic->info.link = _e_fm2_icon_desktop_url_eval(val);
      }
    fclose(f);
    return 1;
    error:
-   if (ic->label) evas_stringshare_del(ic->label);
-   if (ic->comment) evas_stringshare_del(ic->comment);
-   if (ic->generic) evas_stringshare_del(ic->generic);
-   if (ic->icon) evas_stringshare_del(ic->icon);
-   if (ic->link) evas_stringshare_del(ic->link);
-   ic->label = NULL;
-   ic->comment = NULL;
-   ic->generic = NULL;
-   ic->icon = NULL;
-   ic->link = NULL;
+   if (ic->info.label) evas_stringshare_del(ic->info.label);
+   if (ic->info.comment) evas_stringshare_del(ic->info.comment);
+   if (ic->info.generic) evas_stringshare_del(ic->info.generic);
+   if (ic->info.icon) evas_stringshare_del(ic->info.icon);
+   if (ic->info.link) evas_stringshare_del(ic->info.link);
+   ic->info.label = NULL;
+   ic->info.comment = NULL;
+   ic->info.generic = NULL;
+   ic->info.icon = NULL;
+   ic->info.link = NULL;
    fclose(f);
    return 0;
 }
@@ -1347,13 +1419,18 @@
 _e_fm2_region_realize(E_Fm2_Region *rg)
 {
    Evas_List *l;
+   E_Fm2_Icon *ic;
    
    if (rg->realized) return;
    /* actually create evas objects etc. */
    rg->realized = 1;
-   printf("REG %p REALIZE\n", rg);
    edje_freeze();
    for (l = rg->list; l; l = l->next) _e_fm2_icon_realize(l->data);
+   for (l = rg->list; l; l = l->next)
+     {
+       ic = l->data;
+       if (ic->selected) evas_object_raise(ic->obj);
+     }
    edje_thaw();
 }
 
@@ -1365,7 +1442,6 @@
    if (!rg->realized) return;
    /* delete evas objects */
    rg->realized = 0;
-   printf("REG %p UNREALIZE\n", rg);
    edje_freeze();
    for (l = rg->list; l; l = l->next) _e_fm2_icon_unrealize(l->data);
    edje_thaw();
@@ -1404,7 +1480,7 @@
      {
        /* if its a directory && open dirs in-place is set then change the dir
         * to be the dir + file */
-       if ((S_ISDIR(ic->st.st_mode)) && 
+       if ((S_ISDIR(ic->info.statinfo.st_mode)) && 
            (ic->sd->config->view.open_dirs_in_place) &&
            (!ic->sd->config->view.no_subdir_jump) &&
            (!ic->sd->config->view.single_click)
@@ -1413,7 +1489,7 @@
             char buf[4096], *dev = NULL;
             
             if (ic->sd->dev) dev = strdup(ic->sd->dev);
-            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->path, ic->file);
+            snprintf(buf, sizeof(buf), "%s/%s", ic->sd->path, ic->info.file);
             e_fm2_path_set(ic->sd->obj, dev, buf);
             E_FREE(dev);
          }
@@ -1507,7 +1583,8 @@
          _e_fm2_icon_deselect(ic);
        else
          _e_fm2_icon_select(ic);
-       if (!(S_ISDIR(ic->st.st_mode)) && 
+       if ((!(S_ISDIR(ic->info.statinfo.st_mode)) ||
+            (ic->sd->config->view.no_subdir_jump)) &&
            (ic->sd->config->view.single_click)
            )
          {
@@ -1556,7 +1633,6 @@
    sd = evas_object_smart_data_get(data);
    if (!sd) return;
    sd->scroll_job = NULL;
-   printf("DO scroll!\n");
    evas_event_freeze(evas_object_evas_get(sd->obj));
    edje_freeze();
    _e_fm2_regions_eval(sd->obj);
@@ -1625,19 +1701,21 @@
    
    ic1 = data1;
    ic2 = data2;
-   if (ic1->sd->config->list.sort.dirs.last)
+   if (ic1->sd->config->list.sort.dirs.first)
      {
-       if ((S_ISDIR(ic1->st.st_mode)) != (S_ISDIR(ic2->st.st_mode)))
+       if ((S_ISDIR(ic1->info.statinfo.st_mode)) != 
+           (S_ISDIR(ic2->info.statinfo.st_mode)))
          {
-            if (S_ISDIR(ic1->st.st_mode)) return -1;
+            if (S_ISDIR(ic1->info.statinfo.st_mode)) return -1;
             else return 1;
          }
      }
-   else if (ic1->sd->config->list.sort.dirs.first)
+   else if (ic1->sd->config->list.sort.dirs.last)
      {
-       if ((S_ISDIR(ic1->st.st_mode)) != (S_ISDIR(ic2->st.st_mode)))
+       if ((S_ISDIR(ic1->info.statinfo.st_mode)) != 
+           (S_ISDIR(ic2->info.statinfo.st_mode)))
          {
-            if (S_ISDIR(ic1->st.st_mode)) return 1;
+            if (S_ISDIR(ic1->info.statinfo.st_mode)) return 1;
             else return -1;
          }
      }
@@ -1645,8 +1723,8 @@
      {
        char buf1[4096], buf2[4096], *p;
        
-       strncpy(buf1, ic1->file, sizeof(buf1) - 2);
-       strncpy(buf2, ic2->file, sizeof(buf2) - 2);
+       strncpy(buf1, ic1->info.file, sizeof(buf1) - 2);
+       strncpy(buf2, ic2->info.file, sizeof(buf2) - 2);
        buf1[sizeof(buf1) - 1] = 0;
        buf2[sizeof(buf2) - 1] = 0;
        p = buf1;
@@ -1663,7 +1741,7 @@
          }
        return strcmp(buf1, buf2);
      }
-   return strcmp(ic1->file, ic2->file);
+   return strcmp(ic1->info.file, ic2->info.file);
 }
 
 static int
@@ -1741,6 +1819,10 @@
                                        sd->x + ic->x - sd->pos.x, 
                                        sd->y + ic->y - sd->pos.y);
                       evas_object_resize(ic->obj, ic->w, ic->h);
+                      if (_e_fm2_icon_visible(ic))
+                        e_thumb_icon_begin(ic->obj_icon);
+                      else
+                        e_thumb_icon_end(ic->obj_icon);
                    }
               }
          }
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_fm.h      19 Jul 2006 19:38:29 -0000      1.5
+++ e_fm.h      22 Jul 2006 21:48:24 -0000      1.6
@@ -15,7 +15,8 @@
    E_FM2_VIEW_MODE_LIST /* vertical fileselector list */
 } E_Fm2_View_Mode;
 
-typedef struct _E_Fm2_Config E_Fm2_Config;
+typedef struct _E_Fm2_Config    E_Fm2_Config;
+typedef struct _E_Fm2_Icon_Info E_Fm2_Icon_Info;
 
 #else
 #ifndef E_FM_H
@@ -81,13 +82,31 @@
    } geometry;
 };
 
+struct _E_Fm2_Icon_Info
+{
+   const char       *file;
+   const char       *mime;
+   const char       *label;
+   const char       *comment;
+   const char       *generic;
+   const char       *icon;
+   const char       *link;
+   struct stat       statinfo;
+   unsigned char     mount : 1;
+};
+
 EAPI int                   e_fm2_init(void);
 EAPI int                   e_fm2_shutdown(void);
 EAPI Evas_Object          *e_fm2_add(Evas *evas);
 EAPI void                  e_fm2_path_set(Evas_Object *obj, char *dev, char 
*path);
 EAPI void                  e_fm2_path_get(Evas_Object *obj, const char **dev, 
const char **path);
+EAPI const char           *e_fm2_real_path_get(Evas_Object *obj);
 EAPI int                   e_fm2_has_parent_get(Evas_Object *obj);
 EAPI void                  e_fm2_parent_go(Evas_Object *obj);
+EAPI void                  e_fm2_config_set(Evas_Object *obj, E_Fm2_Config 
*cfg);
+EAPI E_Fm2_Config         *e_fm2_config_get(Evas_Object *obj);
+EAPI Evas_List            *e_fm2_selected_list_get(Evas_Object *obj);
+EAPI Evas_List            *e_fm2_all_list_get(Evas_Object *obj);
     
 EAPI void                  e_fm2_pan_set(Evas_Object *obj, Evas_Coord x, 
Evas_Coord y);
 EAPI void                  e_fm2_pan_get(Evas_Object *obj, Evas_Coord *x, 
Evas_Coord *y);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_includes.h,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -3 -r1.106 -r1.107
--- e_includes.h        21 Jul 2006 20:16:46 -0000      1.106
+++ e_includes.h        22 Jul 2006 21:48:24 -0000      1.107
@@ -140,3 +140,4 @@
 #include "e_entry_dialog.h"
 #include "e_fm.h"
 #include "e_widget_scrollframe.h"
+#include "e_sha1.h"
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_test.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- e_test.c    21 Jul 2006 20:16:46 -0000      1.55
+++ e_test.c    22 Jul 2006 21:48:24 -0000      1.56
@@ -601,7 +601,54 @@
 static void
 _e_test_cb_favorites_selected(void *data, Evas_Object *obj, void *event_info)
 {
-   printf("FAV CHANGED\n");
+   Evas_List *selected;
+   E_Fm2_Icon_Info *ici;
+   
+   printf("FAV SELECTED\n");
+   selected = e_fm2_selected_list_get(obj);
+   if (!selected) return;
+   ici = selected->data;
+   if ((ici->link) && (ici->mount))
+     e_fm2_path_set(data, (char *)ici->link, "/");
+   else if (ici->link)
+     e_fm2_path_set(data, NULL, (char *)ici->link);
+// FIXME: this should happen on the scrollframe not the fm obj   
+//   e_widget_scrollframe_child_pos_set(data, 0, 0);
+   evas_list_free(selected);
+}
+    
+static void
+_e_test_cb_favorites_files_changed(void *data, Evas_Object *obj, void 
*event_info)
+{
+   Evas_List *icons, *l;
+   E_Fm2_Icon_Info *ici;
+   const char *realpath;
+   char *p1, *p2;
+   
+   printf("FAV LIST CHANGE!\n");
+   icons = e_fm2_all_list_get(obj);
+   if (!icons) return;
+   realpath = e_fm2_real_path_get(data);
+   p1 = ecore_file_realpath(realpath);
+   if (!p1) goto done;
+   for (l = icons; l; l = l->next)
+     {
+       ici = l->data;
+       if (ici->link)
+         {
+            p2 = ecore_file_realpath(ici->link);
+            if (!strcmp(p1, p2))
+              {
+                 e_fm2_select_set(obj, ici->file);
+                 E_FREE(p2);
+                 goto done;
+              }
+            E_FREE(p2);
+         }
+     }
+   done:
+   E_FREE(p1);
+   evas_list_free(icons);
 }
     
 static void
@@ -626,8 +673,26 @@
 
    /* actual files */
    ofm = e_fm2_add(dia->win->evas);
-   /* FIXME: set config */
-   e_fm2_path_set(ofm, "~/", "/pix/bg");
+   
+   memset(&fmc, 0, sizeof(E_Fm2_Config));
+   fmc.view.mode = E_FM2_VIEW_MODE_LIST;
+   fmc.view.open_dirs_in_place = 1;
+   fmc.view.selector = 1;
+   fmc.view.single_click = 0;
+   fmc.view.no_subdir_jump = 0;
+   fmc.icon.list.w = 24;
+   fmc.icon.list.h = 24;
+   fmc.icon.fixed.w = 1;
+   fmc.icon.fixed.h = 1;
+   fmc.icon.extension.show = 0;
+   fmc.list.sort.no_case = 1;
+   fmc.list.sort.dirs.first = 1;
+   fmc.list.sort.dirs.last = 0;
+   fmc.selection.single = 1;
+   fmc.selection.windows_modifiers = 0;
+   e_fm2_config_set(ofm, &fmc);
+   
+   e_fm2_path_set(ofm, "~/", "/");
    ob = e_widget_button_add(dia->win->evas, "Up a directory", NULL,
                           _e_test_cb_button, ofm, NULL);
    e_widget_table_object_append(ot, ob, 1, 0, 1, 1, 0, 0, 1, 0);
@@ -646,8 +711,27 @@
 
    /* shortcut list */
    ofm = e_fm2_add(dia->win->evas);
-   /* FIXME: set config */
-   e_fm2_path_set(ofm, "~/", "/.e/e/fileman/favorites");
+
+   memset(&fmc, 0, sizeof(E_Fm2_Config));
+   fmc.view.mode = E_FM2_VIEW_MODE_LIST;
+   fmc.view.open_dirs_in_place = 1;
+   fmc.view.selector = 1;
+   fmc.view.single_click = 1;
+   fmc.view.no_subdir_jump = 1;
+   fmc.icon.list.w = 24;
+   fmc.icon.list.h = 24;
+   fmc.icon.fixed.w = 1;
+   fmc.icon.fixed.h = 1;
+   fmc.icon.extension.show = 0;
+   fmc.list.sort.no_case = 1;
+   fmc.list.sort.dirs.first = 0;
+   fmc.list.sort.dirs.last = 0;
+   fmc.selection.single = 1;
+   fmc.selection.windows_modifiers = 0;
+   e_fm2_config_set(ofm, &fmc);
+   
+   e_fm2_path_set(ofm, "favorites", "/");
+   evas_object_smart_callback_add(ofm, "files_changed", 
_e_test_cb_favorites_files_changed, ofm2);
    evas_object_smart_callback_add(ofm, "selected", 
_e_test_cb_favorites_selected, ofm2);
    of = e_widget_scrollframe_pan_add(dia->win->evas, ofm,
                                     e_fm2_pan_set, e_fm2_pan_get,
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- e_thumb.c   17 Jul 2006 19:02:42 -0000      1.33
+++ e_thumb.c   22 Jul 2006 21:48:24 -0000      1.34
@@ -121,6 +121,7 @@
    
    eth = evas_object_data_get(obj, "e_thumbdata");
    if (!eth) return;
+   if (eth->busy) return;
    if (!eth->file) return;
    if (!_thumbnailers)
      {
@@ -161,11 +162,7 @@
    if (!eth) return;
    if (eth->queued) _thumb_queue = evas_list_remove(_thumb_queue, eth);
    eth->queued = 0;
-   if (eth->busy)
-     {
-       printf("REQ DEL %s\n", eth->file);
-       _e_thumb_gen_end(eth->objid);
-     }
+   if (eth->busy) _e_thumb_gen_end(eth->objid);
    eth->busy = 0;
    _pending--;
    if (_pending == 0) _e_thumb_thumbnailers_kill();
@@ -223,6 +220,7 @@
 {
    if (!evas_list_find(_thumbnailers, e->client)) return;
    _thumbnailers = evas_list_remove(_thumbnailers, e->client);
+   if ((!_thumbs) && (!_thumbnailers)) _objid = 0;
 }
 
 /* local subsystem functions */
@@ -300,7 +298,7 @@
    
    snprintf(buf, sizeof(buf), "%i", objid);
    _thumbs = evas_hash_del(_thumbs, buf, NULL);
-   if (!_thumbs) _objid = 0;
+   if ((!_thumbs) && (!_thumbnailers)) _objid = 0;
 }
 
 static Evas_Object *
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_thumb_main.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_thumb_main.c      10 Jul 2006 19:37:02 -0000      1.5
+++ e_thumb_main.c      22 Jul 2006 21:48:24 -0000      1.6
@@ -12,6 +12,7 @@
 #include <Evas.h>
 #include <Eet.h>
 #include <Edje.h>
+#include "e_sha1.h"
 
 typedef struct _E_Thumb E_Thumb;
 
@@ -29,6 +30,7 @@
 static int _e_ipc_cb_server_del(void *data, int type, void *event);
 static int _e_ipc_cb_server_data(void *data, int type, void *event);
 static int _e_cb_timer(void *data);
+static int _e_thumb_valid(E_Thumb *eth);
 static void _e_thumb_generate(E_Thumb *eth);
 static char *_e_thumb_file_id(char *file, char *key);
 
@@ -43,7 +45,8 @@
 main(int argc, char **argv)
 {
    int i;
-   
+
+   nice(20);
    for (i = 1; i < argc; i++)
      {
        if ((!strcmp(argv[i], "-h")) ||
@@ -168,7 +171,7 @@
                  eth->file = strdup(file);
                  if (key) eth->key = strdup(key);
                  _thumblist = evas_list_append(_thumblist, eth);
-                 if (!_timer) _timer = ecore_timer_add(0.001, _e_cb_timer, 
NULL);
+                 if (!_timer) _timer = ecore_timer_add(0.000001, _e_cb_timer, 
NULL);
               }
          }
        break;
@@ -201,17 +204,36 @@
 _e_cb_timer(void *data)
 {
    E_Thumb *eth;
+   Evas_List *del_list = NULL, *l;
 
    /* take thumb at head of list */
    if (_thumblist)
      {
-       eth = _thumblist->data;
-       _thumblist = evas_list_remove_list(_thumblist, _thumblist);
-       _e_thumb_generate(eth);
-       if (eth->file) free(eth->file);
-       if (eth->key) free(eth->key);
-       free(eth);
-       if (_thumblist) _timer = ecore_timer_add(0.00001, _e_cb_timer, NULL);
+       for (l = _thumblist; l; l = l->next)
+         {
+            eth = l->data;
+            if (_e_thumb_valid(eth))
+              del_list = evas_list_append(del_list, eth);
+         }
+       while (del_list)
+         {
+            eth = del_list->data;
+            del_list = evas_list_remove_list(del_list, del_list);
+            _thumblist = evas_list_remove(_thumblist, eth);
+            if (eth->file) free(eth->file);
+            if (eth->key) free(eth->key);
+            free(eth);
+         }
+       if (_thumblist)
+         {
+            eth = _thumblist->data;
+            _thumblist = evas_list_remove_list(_thumblist, _thumblist);
+            _e_thumb_generate(eth);
+            if (eth->file) free(eth->file);
+            if (eth->key) free(eth->key);
+            free(eth);
+         }
+       if (_thumblist) _timer = ecore_timer_add(0.000001, _e_cb_timer, NULL);
        else _timer = NULL;
      }
    else
@@ -219,6 +241,39 @@
    return 0;
 }
 
+static int
+_e_thumb_valid(E_Thumb *eth)
+{
+   char buf[4096], dbuf[4096], *id, *td;
+   time_t mtime_orig, mtime_thumb;
+
+   id = _e_thumb_file_id(eth->file, eth->key);
+   if (!id) return;
+   
+   td = strdup(id);
+   if (!td)
+     {
+       free(id);
+       return;
+     }
+   td[2] = 0;
+   
+   snprintf(dbuf, sizeof(dbuf), "%s/%s", _thumbdir, td);
+   snprintf(buf, sizeof(buf), "%s/%s/%s-%ix%i.thm", 
+           _thumbdir, td, id + 2, eth->w, eth->h);
+   free(id);
+   free(td);
+   
+   mtime_orig = ecore_file_mod_time(eth->file);
+   mtime_thumb = ecore_file_mod_time(buf);
+   if (mtime_thumb > mtime_orig)
+     {
+       ecore_ipc_server_send(_e_ipc_server, 5, 2, eth->objid, 0, 0, buf, 
strlen(buf) + 1);
+       return 1;
+     }
+   return 0;
+}
+
 static void
 _e_thumb_generate(E_Thumb *eth)
 {
@@ -240,11 +295,11 @@
        free(id);
        return;
      }
-   td[3] = 0;
+   td[2] = 0;
    
    snprintf(dbuf, sizeof(dbuf), "%s/%s", _thumbdir, td);
    snprintf(buf, sizeof(buf), "%s/%s/%s-%ix%i.thm", 
-           _thumbdir, td, id + 3, eth->w, eth->h);
+           _thumbdir, td, id + 2, eth->w, eth->h);
    free(id);
    free(td);
    
@@ -336,56 +391,36 @@
    ecore_ipc_server_send(_e_ipc_server, 5, 2, eth->objid, 0, 0, buf, 
strlen(buf) + 1);
 }
 
+/* FIXME: should use md5 or sha1 sum of the path */
 static char *
 _e_thumb_file_id(char *file, char *key)
 {
-   char s[512], *sp;
-   const char *chmap =
-     "0123456789abcdef"
-     "ghijklmnopqrstuv";
-   unsigned int id[8], i, t, tt;
-   int j;
-   
-   for (i = 0; i < 8; i++) id[i] = 0x55555555;
-   
-   j = 0;
-   sp = file;
-   while (*sp)
-     {
-       i = ((int)*sp) & 0x7;
-       id[i] ^= ((int)*sp) << j;
-       j++;
-       if (j == 25) j = 0;
-       sp++;
+   char s[64];
+   const char *chmap = "0123456789abcdef";
+   unsigned char *buf, id[20];
+   int i, len, lenf;
+
+   len = 0;
+   lenf = strlen(file);
+   len += lenf;
+   len++;
+   if (key)
+     {
+       key += strlen(key);
+       len++;
      }
+   buf = alloca(len);
+
+   strcpy(buf, file);
+   if (key) strcpy(buf + lenf + 1, key);
+
+   e_sha1_sum(buf, len, id);
    
-   sp = key;
-   if (sp)
+   for (i = 0; i < 20; i++)
      {
-       while (*sp)
-         {
-            i = ((int)*sp) & 0x7;
-            id[i] ^= ((int)*sp) << j;
-            j++;
-            if (j == 25) j = 0;
-            sp++;
-         }
-     }
-     
-   sp = s;
-   for (i = 0; i < 8; i++)
-     {
-       t = id[i];
-       j = 32;
-       while (j > 0)
-         {
-            tt = t & ((1 << 5) - 1);
-            *sp = chmap[tt];
-            t >>= 5;
-            j -= 5;
-            sp++;
-         }
+       s[(i * 2) + 0] = chmap[(id[i] >> 4) & 0xf];
+       s[(i * 2) + 1] = chmap[(id[i]     ) & 0xf];
      }
-   *sp = 0;
+   s[(i * 2)] = 0;
    return strdup(s);
 }
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -3 -r1.47 -r1.48
--- e_utils.c   19 Jul 2006 11:59:22 -0000      1.47
+++ e_utils.c   22 Jul 2006 21:48:24 -0000      1.48
@@ -595,6 +595,77 @@
    return ret;
 }
 
+EAPI char *
+e_util_shell_env_path_eval(char *path)
+{
+   /* evaluate things like:
+    * $HOME/bling -> /home/user/bling
+    * $HOME/bin/$HOSTNAME/blah -> /home/user/bin/localhost/blah
+    * etc. etc.
+    */
+   char buf[4096], *pd, *p, *v1, *v2, *s, *v, *vp;
+   int esc = 0, invar = 0;
+
+   for (p = path, pd = buf; (pd < (buf + sizeof(buf) - 1)); p++)
+     {
+       if (invar)
+         {
+            if (!((isalnum(*p)) || (*p == '_')))
+              {
+                 v2 = p;
+                 invar = 0;
+                 if ((v2 - v1) > 1)
+                   {
+                      s = alloca(v2 - v1);
+                      strncpy(s, v1 + 1, v2 - v1 - 1);
+                      s[v2 - v1 - 1] = 0;
+                      v = getenv(s);
+                      if (v)
+                        {
+                           vp = v;
+                           while ((*vp) && (pd < (buf + sizeof(buf) - 1)))
+                             {
+                                *pd = *vp;
+                                vp++;
+                                pd++;
+                             }
+                        }
+                   }
+                 if (pd < (buf + sizeof(buf) - 1))
+                   {
+                      *pd = *p;
+                      pd++;
+                   }
+              }
+         }
+       else
+         {
+            if (esc)
+              {
+                 *pd = *p;
+                 pd++;
+              }
+            else
+              {
+                 if (*p == '\\') esc = 1;
+                 else if (*p == '$')
+                   {
+                      invar = 1;
+                      v1 = p;
+                   }
+                 else
+                   {
+                      *pd = *p;
+                      pd++;
+                   }
+              }
+         }
+       if (*p == 0) break;
+     }
+   *pd = 0;
+   return strdup(buf);
+}
+
 /* local subsystem functions */
 static void
 _e_util_container_fake_mouse_up_cb(void *data)
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_utils.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- e_utils.h   19 Jul 2006 11:59:22 -0000      1.25
+++ e_utils.h   22 Jul 2006 21:48:24 -0000      1.26
@@ -41,6 +41,7 @@
 EAPI void         e_util_dialog_internal(const char *title, const char *txt);
 EAPI const char  *e_util_filename_escape(const char *filename);
 EAPI int          e_util_icon_save(Ecore_X_Icon *icon, const char *filename);
-
+EAPI char        *e_util_shell_env_path_eval(char *path);
+    
 #endif
 #endif
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_scrollframe.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_widget_scrollframe.c      21 Jul 2006 20:16:46 -0000      1.1
+++ e_widget_scrollframe.c      22 Jul 2006 21:48:24 -0000      1.2
@@ -42,6 +42,33 @@
    return obj;
 }
 
+EAPI void
+e_widget_scrollframe_child_pos_set(Evas_Object *obj, Evas_Coord x, Evas_Coord 
y)
+{
+   E_Widget_Data *wd;
+
+   wd = e_widget_data_get(obj);
+   e_scrollframe_child_pos_set(wd->o_scrollframe, x, y);
+}
+
+EAPI void
+e_widget_scrollframe_child_pos_get(Evas_Object *obj, Evas_Coord *x, Evas_Coord 
*y)
+{
+   E_Widget_Data *wd;
+
+   wd = e_widget_data_get(obj);
+   e_scrollframe_child_pos_get(wd->o_scrollframe, x, y);
+}
+
+EAPI void
+e_widget_scrollframe_child_region_show(Evas_Object *obj, Evas_Coord x, 
Evas_Coord y, Evas_Coord w, Evas_Coord h)
+{
+   E_Widget_Data *wd;
+
+   wd = e_widget_data_get(obj);
+   e_scrollframe_child_region_show(wd->o_scrollframe, x, y, w, h);
+}
+
 /* Private functions */
 static void
 _e_wid_del_hook(Evas_Object *obj)
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_scrollframe.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_widget_scrollframe.h      21 Jul 2006 20:16:46 -0000      1.1
+++ e_widget_scrollframe.h      22 Jul 2006 21:48:24 -0000      1.2
@@ -7,6 +7,9 @@
 #define E_WIDGET_SCROLLFRAME_H
 
 EAPI Evas_Object *e_widget_scrollframe_pan_add(Evas *evas, Evas_Object *pan, 
void (*pan_set) (Evas_Object *obj, Evas_Coord x, Evas_Coord y), void (*pan_get) 
(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_max_get) 
(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y), void (*pan_child_size_get) 
(Evas_Object *obj, Evas_Coord *x, Evas_Coord *y));
+EAPI void e_widget_scrollframe_child_pos_set(Evas_Object *obj, Evas_Coord x, 
Evas_Coord y);
+EAPI void e_widget_scrollframe_child_pos_get(Evas_Object *obj, Evas_Coord *x, 
Evas_Coord *y);
+EAPI void e_widget_scrollframe_child_region_show(Evas_Object *obj, Evas_Coord 
x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
 
 #endif
 #endif



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to