Enlightenment CVS committal Author : chaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/bin Modified Files: evfs_operation.c evfs_operation_tasks.c Log Message: * Deal with response types more properly =================================================================== RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_operation.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- evfs_operation.c 22 Apr 2006 06:50:25 -0000 1.13 +++ evfs_operation.c 7 Aug 2006 16:31:28 -0000 1.14 @@ -259,7 +259,9 @@ task->status = EVFS_OPERATION_TASK_STATUS_EXEC_CONT; op->status = EVFS_OPERATION_STATUS_NORMAL; } else if (op->response == EVFS_OPERATION_RESPONSE_AFFIRM_ALL) { - op->status = EVFS_OPERATION_STATUS_OVERRIDE; + op->status = EVFS_OPERATION_STATUS_OVERRIDE_YES; + } else if (op->response == EVFS_OPERATION_RESPONSE_NEGATE_ALL) { + op->status = EVFS_OPERATION_STATUS_OVERRIDE_NO; } else if (op->response == EVFS_OPERATION_RESPONSE_NEGATE) { printf("NEGATE reponse received\n"); task->status = EVFS_OPERATION_TASK_STATUS_CANCEL; @@ -279,6 +281,7 @@ { evfs_operation_task* task = NULL; + TASK_RUN_LOOP: task = ecore_list_current(op->sub_task); if (task) { @@ -286,8 +289,14 @@ evfs_operation_response_handle(op,task); } + if (task->status == EVFS_OPERATION_TASK_STATUS_CANCEL) { + ecore_list_next(op->sub_task); + goto TASK_RUN_LOOP; + } + - if (op->status == EVFS_OPERATION_STATUS_NORMAL || op->status == EVFS_OPERATION_STATUS_OVERRIDE) { + if (op->status == EVFS_OPERATION_STATUS_NORMAL || op->status == EVFS_OPERATION_STATUS_OVERRIDE_YES || + op->status == EVFS_OPERATION_STATUS_OVERRIDE_NO ) { if (task->status == EVFS_OPERATION_TASK_STATUS_PENDING) task->status = EVFS_OPERATION_TASK_STATUS_EXEC; =================================================================== RCS file: /cvs/e/e17/apps/evfs/src/bin/evfs_operation_tasks.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- evfs_operation_tasks.c 22 Jul 2006 06:09:26 -0000 1.8 +++ evfs_operation_tasks.c 7 Aug 2006 16:31:28 -0000 1.9 @@ -21,19 +21,26 @@ /*Check if we're trying to overwrite*/ - if (!(op->status == EVFS_OPERATION_STATUS_OVERRIDE) && - !(EVFS_OPERATION_TASK(copy)->status == EVFS_OPERATION_TASK_STATUS_EXEC_CONT) && + if (!(op->status == EVFS_OPERATION_STATUS_OVERRIDE_YES)) { + + if (!(EVFS_OPERATION_TASK(copy)->status == EVFS_OPERATION_TASK_STATUS_EXEC_CONT) && !(EVFS_OPERATION_TASK(copy)->status == EVFS_OPERATION_TASK_STATUS_CANCEL)) { if (copy->dest_stat_response != EVFS_ERROR) { - /*Looks like we're overwriting*/ + if (!(op->status == EVFS_OPERATION_STATUS_OVERRIDE_NO)) { + /*Looks like we're overwriting*/ - evfs_operation_status_set(op, EVFS_OPERATION_STATUS_USER_WAIT); - evfs_operation_wait_type_set(op, EVFS_OPERATION_WAIT_TYPE_FILE_OVERWRITE); - evfs_operation_user_dispatch(op->client, op->command, op, copy->file_to->path); + evfs_operation_status_set(op, EVFS_OPERATION_STATUS_USER_WAIT); + evfs_operation_wait_type_set(op, EVFS_OPERATION_WAIT_TYPE_FILE_OVERWRITE); + evfs_operation_user_dispatch(op->client, op->command, op, copy->file_to->path); - return 0; + return 0; + } else { + /*Overide == no to all - skip*/ + EVFS_OPERATION_TASK(copy)->status = EVFS_OPERATION_TASK_STATUS_CANCEL; + } } + } } /*Check for cancel...*/ ------------------------------------------------------------------------- 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