Dne pondělí 20 říjen 2008 Klaus Ethgen napsal(a):
> Hi,
>
> I tried to find out the place where the notification for the new image
> to view is when deleting a file. Unfortunate I got a stack overflow,
> that many functions call one another and another and another...
>
> The base, gqview, did call several maintain functions after (or for)
> deletion of the file entry. This functions did update the respective
> list and switched the viewing to the next picture.
>
> With geeqie that do not work any more (at least for collections).
>
> Is there anyone who can tell me a bit about the structure of the delete
> path in geeqie? I just got to file_util_delete_full() but lost the path
> to the function layout_image_maint_removed() (I think) which should
> switch to the next image.
>

It works like this:

1. file_util_delete_full adds fd->change to each FileData structure
and runs the confirmation dialog

2. the dialog workflow is controlled by file_util_dialog_run, it may add more 
details to fd->change (like target name for rename)

3. when everything is confirmed and checked, file_util_perform_ci is called.
it preforms the actions described in fd->change as internal or
external command. After successful actions it calls file_data_sc_apply_ci
which updates the FileData structure (for rename it changes fd->path,
for delete it does not do anything special)

4. file_data_sc_apply_ci calls file_data_send_notification, which then calls
all functions that were registered with file_data_register_notify_func.


file_data_send_notification is called with
NOTIFY_TYPE_CHANGE for actions described in fd->change (delete, rename...)
NOTIFY_TYPE_REREAD when the file changes its size or timestamp
NOTIFY_TYPE_INTERNAL when some fields in FileData are changed (marks, ...)

FileData also has a version field which is incremented on each change. It is
used for faster updating of filelist.

Vladimir

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Geeqie-devel mailing list
Geeqie-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geeqie-devel

Reply via email to