Enlightenment CVS committal Author : lordchaos Project : e17 Module : apps/evfs
Dir : e17/apps/evfs/src/bin Modified Files: evfs_main.c evfs_server_handle.c Log Message: * Change the way progress events work =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/bin/evfs_main.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -3 -r1.27 -r1.28 --- evfs_main.c 6 Dec 2005 06:16:58 -0000 1.27 +++ evfs_main.c 20 Dec 2005 21:55:02 -0000 1.28 @@ -185,7 +185,7 @@ break; case EVFS_CMD_FILE_COPY: printf("File copy handler\n"); - evfs_handle_file_copy(client,command); + evfs_handle_file_copy(client,command,command); break; default: printf("Warning - unhandled command %d\n", command->type); break; =================================================================== RCS file: /cvsroot/enlightenment/e17/apps/evfs/src/bin/evfs_server_handle.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- evfs_server_handle.c 6 Dec 2005 06:16:58 -0000 1.24 +++ evfs_server_handle.c 20 Dec 2005 21:55:02 -0000 1.25 @@ -203,7 +203,7 @@ } -void evfs_handle_file_copy(evfs_client* client, evfs_command* command) { +void evfs_handle_file_copy(evfs_client* client, evfs_command* command, evfs_command* root_command) { evfs_plugin* plugin; evfs_plugin* dst_plugin; @@ -244,7 +244,7 @@ progress = (double)((double)count / (double)file_stat.st_size * 100); if (progress % 1 == 0 && last_notify_progress < progress) { /*printf ("Percent complete: %d\n", progress);*/ - evfs_file_progress_event_create(client,command,progress, EVFS_PROGRESS_TYPE_CONTINUE); + evfs_file_progress_event_create(client,command, root_command,progress, EVFS_PROGRESS_TYPE_CONTINUE); last_notify_progress = progress; } @@ -299,7 +299,7 @@ //printf("Copy file '%s' to %s\n", file->path, destination_file); - evfs_handle_file_copy(client, recursive_command); + evfs_handle_file_copy(client, recursive_command, root_command); evfs_cleanup_filereference(file); evfs_cleanup_command(recursive_command, 1); @@ -311,11 +311,10 @@ } - - - + /*Only send '100%' event when we're back at the top, or we aren't recursive*/ + if (command == root_command) + evfs_file_progress_event_create(client,command, root_command,100, EVFS_PROGRESS_TYPE_DONE); - evfs_file_progress_event_create(client,command,100, EVFS_PROGRESS_TYPE_DONE); } else { printf("Could not get plugins for both source and dest: (%s:%s)\n",command->file_command.files[0]->plugin_uri, command->file_command.files[1]->plugin_uri ); ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs