Skip to content

Update EogWindow and EogListStore when deleting a monitored directory

Krifa75 requested to merge Ordissimo/eog:hashmap-monitors into master

If we remove the monitored directory from the file manager, the liststore and the view is still here. The cause is in file_monitor_changed_cb in the events G_FILE_MONITOR_EVENT_DELETED and G_FILE_MONITOR_EVENT_MOVED_OUT it handles only the content of the folder.

here is an explanation for the changes :
eog-list-store.c : I changed the GList *monitors into a GHashTable to keep the multiple monitors associated with the directory name (since we can open multiple folder). The reason is that when we enter into the event G_FILE_MONITOR_EVENT_DELETED or G_FILE_MONITOR_EVENT_MOVED_OUT we have to know which directory is concerned. Also I added a func eog_list_store_remove_directory to remove the appropriate directory from the liststore.

eog-image.c : I added g_clear_error inside eog_image_get_file_info to avoid warnings when deleting multiple images.

eog-window.c : We update the window by calling eog_window_clear_load_job in the row-delete signal

Thanks

Edited by Felix Riemann

Merge request reports