Enlightenment CVS committal
Author : chaos
Project : e17
Module : apps/evfs
Dir : e17/apps/evfs/src/lib
Modified Files:
evfs_commands.c
Log Message:
* Treat certain files in samba as dirs (servers,workgroups). This allows
network browsing. We should probably send attach hints with these files, so
the filemanager can select an appropriate icon
* Prepare for trash restore - IO functions
===================================================================
RCS file: /cvs/e/e17/apps/evfs/src/lib/evfs_commands.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -3 -r1.34 -r1.35
--- evfs_commands.c 15 Aug 2006 23:32:53 -0000 1.34
+++ evfs_commands.c 23 Aug 2006 11:29:32 -0000 1.35
@@ -142,8 +142,7 @@
}
long
-evfs_client_file_copy_multi(evfs_connection * conn, Ecore_List* files,
- evfs_filereference* to)
+evfs_client_multi_file_command(evfs_connection * conn, Ecore_List* files,
evfs_filereference* to, int type)
{
evfs_command *command = evfs_client_command_new();
long id = command->client_identifier;
@@ -154,21 +153,16 @@
count = ecore_list_nodes(files);
- command->type = EVFS_CMD_FILE_COPY;
+ command->type = type;
command->file_command.num_files = count+1;
command->file_command.files = malloc(sizeof(evfs_filereference *) *
(count+1));
- printf("Sending %d files for multi copy...\n", count+1);
ecore_list_goto_first(files);
while ((ref = ecore_list_next(files))) {
command->file_command.files[cfile] = ref;
cfile++;
-
- str = evfs_filereference_to_string(ref);
- printf("Added %s to multi copy\n", str);
- free(str);
}
- command->file_command.files[cfile] = to;
+ if (to) command->file_command.files[cfile] = to;
evfs_write_command(conn, command);
@@ -179,6 +173,27 @@
}
+
+long
+evfs_client_file_copy_multi(evfs_connection * conn, Ecore_List* files,
+ evfs_filereference* to)
+{
+ return evfs_client_multi_file_command(conn,files,to,
EVFS_CMD_FILE_COPY);
+}
+
+long
+evfs_client_file_move_multi(evfs_connection * conn, Ecore_List* files,
+ evfs_filereference* to)
+{
+ return evfs_client_multi_file_command(conn,files,to,
EVFS_CMD_FILE_MOVE);
+}
+
+long
+evfs_client_file_trash_restore(evfs_connection * conn, Ecore_List* files)
+{
+ return evfs_client_multi_file_command(conn,files,NULL,
EVFS_CMD_TRASH_RESTORE);
+}
+
long
evfs_client_file_move(evfs_connection * conn, evfs_filereference * from,
evfs_filereference * to)
@@ -200,48 +215,6 @@
return id;
}
-
-
-/*FIXME: This is dup'ed code from ^^ . Rationalise this*/
-long
-evfs_client_file_move_multi(evfs_connection * conn, Ecore_List* files,
- evfs_filereference* to)
-{
- evfs_command *command = evfs_client_command_new();
- long id = command->client_identifier;
- long count = 0;
- long cfile = 0;
- evfs_filereference* ref;
- char* str;
-
- count = ecore_list_nodes(files);
-
- command->type = EVFS_CMD_FILE_MOVE;
- command->file_command.num_files = count+1;
- command->file_command.files = malloc(sizeof(evfs_filereference *) *
(count+1));
-
- printf("Sending %d files for multi move...\n", count+1);
- ecore_list_goto_first(files);
- while ((ref = ecore_list_next(files))) {
- command->file_command.files[cfile] = ref;
- cfile++;
-
- str = evfs_filereference_to_string(ref);
- printf("Added %s to multi move\n", str);
- free(str);
- }
- command->file_command.files[cfile] = to;
-
- evfs_write_command(conn, command);
-
- free(command->file_command.files);
- free(command);
-
- return id;
-
-}
-
-
long
evfs_client_file_open(evfs_connection * conn, evfs_filereference * file)
-------------------------------------------------------------------------
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