Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_fm.c 


Log Message:


i broke icons.
i fixed icons.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -3 -r1.65 -r1.66
--- e_fm.c      18 Sep 2006 03:49:44 -0000      1.65
+++ e_fm.c      18 Sep 2006 05:05:25 -0000      1.66
@@ -1587,7 +1587,6 @@
    Evas_Object *oic;
    char buf[4096], *p;
    
-   if (!ic->realized) return;
    if (ic->info.icon)
      {
        /* custom icon */
@@ -1643,6 +1642,7 @@
                    snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir, 
ic->info.file);
                  else
                    snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, 
ic->info.file);
+                 
                  oic = e_thumb_icon_add(evas_object_evas_get(o));
                  e_thumb_icon_file_set(oic, buf, NULL);
                  e_thumb_icon_size_set(oic, 128, 128);
@@ -1652,16 +1652,35 @@
               }
             else if (!strcmp(icon, "DESKTOP"))
               {
+                 E_App *app;
+                 
                  if (ic->info.pseudo_link)
                    snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir, 
ic->info.file);
                  else
                    snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, 
ic->info.file);
+                 /* FIXME FIXME FIXME: e_app_new() is 
SLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW. it can
+                  * be a complete hog. this destroys performance in fm2. :(:(:(
+                  */
+                 app = e_app_new(buf, 0);
+                 if (app)
+                   {
+                      /* FIXME: Actually, I think it's the icon searching that 
is slowing things down a lot.
+                       * thumbnailing won't work - animated edj icons :)
+                       * need to actually fix the icon searching :) throw in
+                       * a hash cache. they work like a charm - also look
+                       * at improving the search algo :)
+                       */
+                      oic = e_app_icon_add(evas_object_evas_get(o), app);
+                      e_object_unref(E_OBJECT(app));
+                   }
+/* thumbnailing will work only on non-edj animated icons
                  oic = e_thumb_icon_add(evas_object_evas_get(o));
                  e_thumb_icon_file_set(oic, buf, e_config->icon_theme);
                  e_thumb_icon_size_set(oic, 128, 128);
                  evas_object_smart_callback_add(oic, "e_thumb_gen",
                                                 gen_func, data);
                  _e_fm2_icon_thumb(ic);
+ */
               }
             else if (!strncmp(icon, "e/icons/fileman/mime/", 21))
               {
@@ -1690,9 +1709,6 @@
                       e_icon_file_set(oic, icon);
                    }
               }
-            edje_object_part_swallow(o, "e.swallow.icon", oic);
-            evas_object_show(oic);
-            return;
          }
        else
          {
@@ -1722,50 +1738,50 @@
                  evas_object_smart_callback_add(oic, "e_thumb_gen",
                                                 gen_func, data);
                  _e_fm2_icon_thumb(ic);
-                 edje_object_part_swallow(o, "e.swallow.icon", oic);
-                 evas_object_show(oic);
-              }
-            else if (
-                     (e_util_glob_case_match(ic->info.file, "*.eap"))
-                     )
-              {
-                 if (ic->info.pseudo_link)
-                   snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir, 
ic->info.file);
-                 else
-                   snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, 
ic->info.file);
-                 oic = edje_object_add(evas_object_evas_get(o));
-                 edje_object_file_set(oic, buf, "icon");
-                 edje_object_part_swallow(o, "e.swallow.icon", oic);
-                 evas_object_show(oic);
               }
             else if (
                      (e_util_glob_case_match(ic->info.file, "*.desktop"))
                      )
               {
+                 E_App *app;
+                 
                  if (ic->info.pseudo_link)
                    snprintf(buf, sizeof(buf), "%s/%s", ic->info.pseudo_dir, 
ic->info.file);
                  else
                    snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, 
ic->info.file);
-
+                 /* FIXME FIXME FIXME: e_app_new() is 
SLOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW. it can
+                  * be a complete hog. this destroys performance in fm2. :(:(:(
+                  */
+                 app = e_app_new(buf, 0);
+                 if (app)
+                   {
+                      /* FIXME: Actually, I think it's the icon searching that 
is slowing things down a lot.
+                       * thumbnailing won't work - animated edj icons :)
+                       * need to actually fix the icon searching :) throw in
+                       * a hash cache. they work like a charm - also look
+                       * at improving the search algo :)
+                       */
+                      oic = e_app_icon_add(evas_object_evas_get(o), app);
+                      e_object_unref(E_OBJECT(app));
+                   }
+/* thumbnailing will work only on non-edj animated icons
                  oic = e_thumb_icon_add(evas_object_evas_get(o));
                  e_thumb_icon_file_set(oic, buf, e_config->icon_theme);
                  e_thumb_icon_size_set(oic, 128, 96);
                  evas_object_smart_callback_add(oic, "e_thumb_gen", 
                                                 gen_func, data);
                  _e_fm2_icon_thumb(ic);
-
-                 edje_object_part_swallow(o, "e.swallow.icon", oic);
-                 evas_object_show(oic);
+ */
               }
             else
               {
                  oic = edje_object_add(evas_object_evas_get(o));
                  e_theme_edje_object_set(oic, "base/theme/fileman",
                                          "e/icons/fileman/file");
-                 edje_object_part_swallow(o, "e.swallow.icon", oic);
-                 evas_object_show(oic);
               }
          }
+       edje_object_part_swallow(o, "e.swallow.icon", oic);
+       evas_object_show(oic);
      }
    return oic;
 }
@@ -1773,9 +1789,10 @@
 static void
 _e_fm2_icon_icon_set(E_Fm2_Icon *ic)
 {
+   if (!ic->realized) return;
    ic->obj_icon = _e_fm2_icon_icon_direct_set(ic, ic->obj,
                                              _e_fm2_cb_icon_thumb_gen,
-                                             ic->obj);
+                                             ic);
 }
 
 static void
@@ -2664,6 +2681,7 @@
    E_Fm2_Icon *ic;
    
    ic = data;
+   printf("GEN!\n");
    if (ic->realized)
      {
        Evas_Coord w = 0, h = 0;



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to