Hi,
 this patch let the user select which application is used to open a
directory (in the "open with..." dialog). Later it might be useful to
set one filemanager as default, e.g. if one wants to open
directories on the desktop with entropy, or others. 

i'm not shure if the line
ic->info.mime = evas_stringshare_add("x-directory/normal");
 is correct, since i dont know how stringshare works. intended would
be that only one instance of this string exists(shared between all
directory files).

Regards,
Hannes "jeffdameth" Janetzek
 
Index: e_fm.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_fm.c,v
retrieving revision 1.171
diff -u -r1.171 e_fm.c
--- e_fm.c	21 May 2007 14:12:48 -0000	1.171
+++ e_fm.c	26 May 2007 15:32:11 -0000
@@ -2776,6 +2776,10 @@
 	/* FIXME: end go away chunk */
      }
    
+   if(S_ISDIR(ic->info.statinfo.st_mode))
+     {
+       ic->info.mime = evas_stringshare_add("x-directory/normal");
+     }
    if (!ic->info.mime)
      {
 	mime = e_fm_mime_filename_get(ic->info.file);
Index: e_fwin.c
===================================================================
RCS file: /var/cvs/e/e17/apps/e/src/bin/e_fwin.c,v
retrieving revision 1.46
diff -u -r1.46 e_fwin.c
--- e_fwin.c	21 May 2007 14:12:48 -0000	1.46
+++ e_fwin.c	26 May 2007 15:32:13 -0000
@@ -725,8 +725,7 @@
 _e_fwin_file_is_exec(E_Fm2_Icon_Info *ici)
 {
    /* special file or dir - can't exec anyway */
-   if ((S_ISDIR(ici->statinfo.st_mode)) ||
-       (S_ISCHR(ici->statinfo.st_mode)) ||
+  if ((S_ISCHR(ici->statinfo.st_mode)) ||
        (S_ISBLK(ici->statinfo.st_mode)) ||
        (S_ISFIFO(ici->statinfo.st_mode)) ||
        (S_ISSOCK(ici->statinfo.st_mode)))
@@ -935,22 +934,16 @@
 	       {
 		  if (ici->link)
 		    {
-		       if (!S_ISDIR(ici->statinfo.st_mode))
-			 {
-			    f = e_fm_mime_filename_get(ici->link);
-			    mimes = evas_hash_del(mimes, f, (void *)1);
-			    mimes = evas_hash_direct_add(mimes, f, (void *)1);
-			 }
+		      f = e_fm_mime_filename_get(ici->link);
+		      mimes = evas_hash_del(mimes, f, (void *)1);
+		      mimes = evas_hash_direct_add(mimes, f, (void *)1);
 		    }
 		  else
 		    {
-		       snprintf(buf, sizeof(buf), "%s/%s",
-				e_fm2_real_path_get(fwin->fm_obj), ici->file);
-		       if (!S_ISDIR(ici->statinfo.st_mode))
-			 {
-			    mimes = evas_hash_del(mimes, ici->mime, (void *)1);
-			    mimes = evas_hash_direct_add(mimes, ici->mime, (void *)1);
-			 }
+		      snprintf(buf, sizeof(buf), "%s/%s",
+			       e_fm2_real_path_get(fwin->fm_obj), ici->file);
+		      mimes = evas_hash_del(mimes, ici->mime, (void *)1);
+		      mimes = evas_hash_direct_add(mimes, ici->mime, (void *)1);
 		    }
 	       }
 	  }
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to