Il giorno gio, 20/03/2008 alle 11.30 +0100, Alexander Larsson ha scritto: > On Thu, 2008-03-20 at 10:18 +0100, Amos Brocco wrote: > > > Not sure what would happen > > > if you trashed two files of the same name from the same directory > > > though, having to deal with the edge cases of the "_filename.2", > > > "_filename.3" with the same original path if you're thinking about > > > going that way though. > > > > By having GFile updating the uri/path information after g_file_trash it > > wouldn't be difficult. For the undo I keep track of the "old uri", "new > > uri" and the operation (copy, move, trash, etc.); if g_file_get_uri > > returns the updated path (in the trash) I could just use the "orig-path" > > attribute to get the original file. > > GFiles are immutable identifies, similare to a pathname string. This > proposal is similar to having trash_file(char *filename) change the > value of filename to the new location. It just doesn't work. > Ok, I understand. What about g_file_trash returning the actual URI (trash://...) instead of a boolean value (NULL if trashing failed)? -- Amos Brocco | Ph.D Student | Computer Science Department - DIUF | University of Fribourg | A406 Pérolles 21 | Bd. Pérolles 90 | CH-1700 Fribourg | http://diuf.unifr.ch/pai/people/broccoa
Attachment:
signature.asc
Description: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio firmata digitalmente