[Nautilus-list] Progress Bar on Move



Hi,

Nautilus doesn't show a progress bar if files are moved between
partitions (Bug 61517). This is due to the assumption in
nautilus_file_operations_copy_move() that move operations involving only
local uris (as reported by gnome-vfs) are very fast (just an inode
relink):

<snip>
/* Do an arbitrary guess that an operation will take very little
/* time and the progress shouldn't be shown.
 */
transfer_info->show_progress_dialog = 
	!all_local || g_list_length ((GList *)item_uris)> 20;
</snip>

This assumption breaks if source and target are on different partitions
(= copy & delete).

I would like to tackle this in the right way. The obvious quickfix is to
always show the progress dialog on move like its done on copy:

transfer_info->show_progress_dialog = TRUE;

But it would be nice if the progress bar is only shown if the operations
takes a certain amount of time.

What would be the best way to determine if source and target are on the
same partition (if local)? Is it possible with gnome-vfs? Or is it
beyond the scope of gnome-vfs and should be helper function in nautilus
(I guess fstab has to be parsed). I greped through the sources but
neither Nautilus nor gnome-vfs seem to have the notion of different
partitions atm.

Or is it even possible to determine how long an operation has already
taken and create the progress dialog after say 0.5 sec?

Martin








[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]