Enlightenment CVS committal

Author  : chaos
Project : e17
Module  : proto

Dir     : e17/proto/entropy/src/plugins


Modified Files:
        filesystem.c 


Log Message:
* Add restore function checks
* Better icons for context menu

===================================================================
RCS file: /cvs/e/e17/proto/entropy/src/plugins/filesystem.c,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -3 -r1.78 -r1.79
--- filesystem.c        26 Aug 2006 13:17:00 -0000      1.78
+++ filesystem.c        28 Aug 2006 10:47:12 -0000      1.79
@@ -1132,23 +1132,34 @@
 void entropy_filesystem_file_trash_restore (Ecore_List* files, 
entropy_gui_component_instance * instance)
 {
   long id;
+  int flag;
   entropy_generic_file* file;
   Ecore_List* evfs_files;
   evfs_filereference* ref;
+  char path[PATH_MAX];
+
+  flag = 0;
 
   evfs_files = ecore_list_new();
   ecore_list_goto_first(files);
   while ( (file = ecore_list_next(files)) ) { 
-         printf("Parsing %s\n", file->uri);
-         if ( (ref =  evfs_parse_uri_single(file->uri))) {
-                 ecore_list_append(evfs_files, ref);
+         if (file->attach) {
+                 snprintf(path, PATH_MAX, "%s%s%s", URI_POSIX, "://", 
file->attach);
+                 printf("Parsing %s\n", path);
+                 if ( (ref =  evfs_parse_uri_single(path))) {
+                         ecore_list_append(evfs_files, ref);
+                 }
+                 flag++;
          }
   }
   
-  /*Track the restore action */
-  id = evfs_client_file_trash_restore (con, evfs_files);
-  ecore_hash_set(evfs_dir_requests, (long*)id, instance);
-
-  ecore_list_destroy(files);
-  ecore_list_destroy(evfs_files);
+  if (flag) {
+         /*Track the restore action */
+         id = evfs_client_file_trash_restore (con, evfs_files);
+         ecore_hash_set(evfs_dir_requests, (long*)id, instance);
+       
+         ecore_list_destroy(evfs_files); 
+  } else {
+         printf("No files with attached uris to de-trash\n");
+  }
 }



-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to