Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : apps/evfs

Dir     : e17/apps/evfs/src/bin


Modified Files:
        evfs_server_handle.c 


Log Message:
* 'Yes-to-all' support for operations

===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/bin/evfs_server_handle.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- evfs_server_handle.c        2 Mar 2006 06:11:07 -0000       1.46
+++ evfs_server_handle.c        2 Mar 2006 06:53:55 -0000       1.47
@@ -372,7 +372,12 @@
    evfs_operation *op;
 
    /*Make a new evfs_operation, for client communication */
-   op = evfs_operation_new();
+   if (root_command == command) {
+          op = evfs_operation_new();
+          root_command->op = op;
+   } else {
+          op = root_command->op;
+   }
 
    plugin =
       evfs_get_plugin_for_uri(client->server,
@@ -403,7 +408,7 @@
 
         /*If this file exists, lock our operation until we get confirmation
          * from the user that they want to overwrite, or not */
-        if (res != EVFS_ERROR)
+        if ( (res != EVFS_ERROR) && !(op->status == 
EVFS_OPERATION_STATUS_OVERRIDE) )
           {
              printf("File overwrite\n");
              evfs_operation_status_set(op, EVFS_OPERATION_STATUS_USER_WAIT);
@@ -422,7 +427,11 @@
                }
              else
                {
-                  printf("User opted to overwrite file!\n");
+                if (op->response == EVFS_OPERATION_RESPONSE_AFFIRM_ALL) {
+                        op->status = EVFS_OPERATION_STATUS_OVERRIDE;
+                }
+                      
+                  printf("User opted to overwrite file! -%d\n", op->response);
                }
           }
 
@@ -574,7 +583,8 @@
      }
 
  CLEANUP:
-   evfs_operation_destroy(op);
+   if (command == root_command)
+          evfs_operation_destroy(op);
 
 }
 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to