Enlightenment CVS committal

Author  : englebass
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_fm.c 


Log Message:
Make fm2 use efreet.
Don't use custom values in standard fields.
This breaks the old .desktop files in fileman/favorites!

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -3 -r1.133 -r1.134
--- e_fm.c      11 Mar 2007 05:54:07 -0000      1.133
+++ e_fm.c      24 Mar 2007 09:54:23 -0000      1.134
@@ -2516,56 +2516,34 @@
 _e_fm2_icon_desktop_load(E_Fm2_Icon *ic)
 {
    char buf[4096];
-   Ecore_Desktop *desktop;
+   Efreet_Desktop *desktop;
    
    snprintf(buf, sizeof(buf), "%s/%s", ic->sd->realpath, ic->info.file);
 
-   desktop = ecore_desktop_get(buf, NULL);
+   desktop = efreet_desktop_get(buf);
    if (desktop)
      {
-       if (desktop->name)     ic->info.label   = 
evas_stringshare_add(desktop->name);
-       if (desktop->generic)  ic->info.generic = 
evas_stringshare_add(desktop->generic);
-       if (desktop->comment)  ic->info.comment = 
evas_stringshare_add(desktop->comment);
+       if (desktop->name)         ic->info.label   = 
evas_stringshare_add(desktop->name);
+       if (desktop->generic_name) ic->info.generic = 
evas_stringshare_add(desktop->generic_name);
+       if (desktop->comment)      ic->info.comment = 
evas_stringshare_add(desktop->comment);
        
-       if (desktop->icon)
-         {
-            char *v;
-            
-            /* FIXME: Use a real icon size. */
-            v = desktop->icon_path;
-// make it consistent and use the same icon everywhere      
-//          v = ecore_desktop_icon_find(desktop->icon, NULL, 
e_config->icon_theme);
-            if (v)
-              {
-                 ic->info.icon = evas_stringshare_add(v);
-//               free(v);
-              }
-         }
-       
-       if (desktop->type)
+       if (desktop->icon) ic->info.icon = evas_stringshare_add(desktop->icon);
+
+       if (desktop->type == EFREET_DESKTOP_TYPE_LINK)
          {
-            if (!strcmp(desktop->type, "Mount"))
-              {
-                 ic->info.mount = 1;
-                 if (desktop->URL)
-                   ic->info.link = _e_fm2_icon_desktop_url_eval(desktop->URL);
-              }
-            else if (!strcmp(desktop->type, "Removable"))
-              {
-                 ic->info.removable = 1;
-                 if (desktop->URL)
-                   ic->info.link = _e_fm2_icon_desktop_url_eval(desktop->URL);
-              }
-            else if (!strcmp(desktop->type, "Link"))
-              {
-                 if (desktop->URL)
-                   ic->info.link = _e_fm2_icon_desktop_url_eval(desktop->URL);
-              }
-            else if (!strcmp(desktop->type, "Application"))
+            if (desktop->url)
+              ic->info.link = _e_fm2_icon_desktop_url_eval(desktop->url);
+            if (desktop->x)
               {
+                 const char *type;
+                 
+                 type = ecore_hash_get(desktop->x, "X-Enlightenment-Type");
+                 if (type)
+                   {
+                      if (!strcmp(type, "Mount")) ic->info.mount = 1;
+                      else if (!strcmp(type, "Removable")) ic->info.removable 
= 1;
+                   }
               }
-            else
-              goto error;
          }
      }
    



-------------------------------------------------------------------------
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